MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / getData

Function getData

code/dependency-injection/public/app.js:2894–2922  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2892}
2893
2894function getData() {
2895 if (compositionState._fallbackText) {
2896 return compositionState._fallbackText;
2897 }
2898
2899 var start = void 0;
2900 var startValue = compositionState._startText;
2901 var startLength = startValue.length;
2902 var end = void 0;
2903 var endValue = getText();
2904 var endLength = endValue.length;
2905
2906 for (start = 0; start < startLength; start++) {
2907 if (startValue[start] !== endValue[start]) {
2908 break;
2909 }
2910 }
2911
2912 var minEnd = startLength - start;
2913 for (end = 1; end <= minEnd; end++) {
2914 if (startValue[startLength - end] !== endValue[endLength - end]) {
2915 break;
2916 }
2917 }
2918
2919 var sliceTail = end > 1 ? 1 - end : undefined;
2920 compositionState._fallbackText = endValue.slice(start, sliceTail);
2921 return compositionState._fallbackText;
2922}
2923
2924function getText() {
2925 if ('value' in compositionState._root) {

Callers 2

extractCompositionEventFunction · 0.70

Calls 1

getTextFunction · 0.70

Tested by

no test coverage detected