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

Function getData

code/redux/public/app.js:3052–3080  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3050}
3051
3052function getData() {
3053 if (compositionState._fallbackText) {
3054 return compositionState._fallbackText;
3055 }
3056
3057 var start = void 0;
3058 var startValue = compositionState._startText;
3059 var startLength = startValue.length;
3060 var end = void 0;
3061 var endValue = getText();
3062 var endLength = endValue.length;
3063
3064 for (start = 0; start < startLength; start++) {
3065 if (startValue[start] !== endValue[start]) {
3066 break;
3067 }
3068 }
3069
3070 var minEnd = startLength - start;
3071 for (end = 1; end <= minEnd; end++) {
3072 if (startValue[startLength - end] !== endValue[endLength - end]) {
3073 break;
3074 }
3075 }
3076
3077 var sliceTail = end > 1 ? 1 - end : undefined;
3078 compositionState._fallbackText = endValue.slice(start, sliceTail);
3079 return compositionState._fallbackText;
3080}
3081
3082function getText() {
3083 if ('value' in compositionState._root) {

Callers 2

extractCompositionEventFunction · 0.70

Calls 1

getTextFunction · 0.70

Tested by

no test coverage detected