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

Function getData

code/dependency-injection-module-system/public/app.js:2852–2880  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2850}
2851
2852function getData() {
2853 if (compositionState._fallbackText) {
2854 return compositionState._fallbackText;
2855 }
2856
2857 var start = void 0;
2858 var startValue = compositionState._startText;
2859 var startLength = startValue.length;
2860 var end = void 0;
2861 var endValue = getText();
2862 var endLength = endValue.length;
2863
2864 for (start = 0; start < startLength; start++) {
2865 if (startValue[start] !== endValue[start]) {
2866 break;
2867 }
2868 }
2869
2870 var minEnd = startLength - start;
2871 for (end = 1; end <= minEnd; end++) {
2872 if (startValue[startLength - end] !== endValue[endLength - end]) {
2873 break;
2874 }
2875 }
2876
2877 var sliceTail = end > 1 ? 1 - end : undefined;
2878 compositionState._fallbackText = endValue.slice(start, sliceTail);
2879 return compositionState._fallbackText;
2880}
2881
2882function getText() {
2883 if ('value' in compositionState._root) {

Callers 2

extractCompositionEventFunction · 0.70

Calls 1

getTextFunction · 0.70

Tested by

no test coverage detected