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

Function filter

static/word2md/mammoth.browser.js:23797–23804  ·  view source on GitHub ↗
(xs, f)

Source from the content-addressed store, hash-verified

23795};
23796
23797function filter (xs, f) {
23798 if (xs.filter) return xs.filter(f);
23799 var res = [];
23800 for (var i = 0; i < xs.length; i++) {
23801 if (f(xs[i], i, xs)) res.push(xs[i]);
23802 }
23803 return res;
23804}
23805
23806// String.prototype.substr - negative index don't work in IE8
23807var substr = 'ab'.substr(-1) === 'b'

Callers 12

promisifiableMethodsFunction · 0.70
copyDescriptorsFunction · 0.70
mammoth.browser.jsFile · 0.70
condenseFunction · 0.50
condenseFunction · 0.50
codemirror.jsFile · 0.50
pruneCacheFunction · 0.50
pruneCacheFunction · 0.50
pruneCacheFunction · 0.50
pruneCacheFunction · 0.50
pruneCacheFunction · 0.50
pruneCacheFunction · 0.50

Calls 1

fFunction · 0.50

Tested by

no test coverage detected