MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / getData

Function getData

code/composition/public/app.js:2939–2967  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2937}
2938
2939function getData() {
2940 if (compositionState._fallbackText) {
2941 return compositionState._fallbackText;
2942 }
2943
2944 var start = void 0;
2945 var startValue = compositionState._startText;
2946 var startLength = startValue.length;
2947 var end = void 0;
2948 var endValue = getText();
2949 var endLength = endValue.length;
2950
2951 for (start = 0; start < startLength; start++) {
2952 if (startValue[start] !== endValue[start]) {
2953 break;
2954 }
2955 }
2956
2957 var minEnd = startLength - start;
2958 for (end = 1; end <= minEnd; end++) {
2959 if (startValue[startLength - end] !== endValue[endLength - end]) {
2960 break;
2961 }
2962 }
2963
2964 var sliceTail = end > 1 ? 1 - end : undefined;
2965 compositionState._fallbackText = endValue.slice(start, sliceTail);
2966 return compositionState._fallbackText;
2967}
2968
2969function getText() {
2970 if ('value' in compositionState._root) {

Callers 2

extractCompositionEventFunction · 0.70

Calls 1

getTextFunction · 0.70

Tested by

no test coverage detected