MCPcopy Create free account
hub / github.com/TruthHun/BookStack / trim

Function trim

static/word2md/mammoth.browser.js:23724–23737  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

23722 to = exports.resolve(to).substr(1);
23723
23724 function trim(arr) {
23725 var start = 0;
23726 for (; start < arr.length; start++) {
23727 if (arr[start] !== '') break;
23728 }
23729
23730 var end = arr.length - 1;
23731 for (; end >= 0; end--) {
23732 if (arr[end] !== '') break;
23733 }
23734
23735 if (start > end) return [];
23736 return arr.slice(start, end - start + 1);
23737 }
23738
23739 var fromParts = trim(from.split('/'));
23740 var toParts = trim(to.split('/'));

Callers 1

mammoth.browser.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected