MCPcopy
hub / github.com/react/create-react-app / trim

Function trim

packages/react-error-overlay/fixtures/bundle_u.mjs:27040–27053  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

27038 to = exports.resolve(to).substr(1);
27039
27040 function trim(arr) {
27041 var start = 0;
27042 for (; start < arr.length; start++) {
27043 if (arr[start] !== '') break;
27044 }
27045
27046 var end = arr.length - 1;
27047 for (; end >= 0; end--) {
27048 if (arr[end] !== '') break;
27049 }
27050
27051 if (start > end) return [];
27052 return arr.slice(start, end - start + 1);
27053 }
27054
27055 var fromParts = trim(from.split('/'));
27056 var toParts = trim(to.split('/'));

Callers 1

bundle_u.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected