MCPcopy Index your code
hub / github.com/RubyLouvre/anu / filter

Function filter

test/babel.js:2131–2138  ·  view source on GitHub ↗
(xs, f)

Source from the content-addressed store, hash-verified

2129 };
2130
2131 function filter(xs, f) {
2132 if (xs.filter) return xs.filter(f);
2133 var res = [];
2134 for (var i = 0; i < xs.length; i++) {
2135 if (f(xs[i], i, xs)) res.push(xs[i]);
2136 }
2137 return res;
2138 }
2139
2140 // String.prototype.substr - negative index don't work in IE8
2141 var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) {

Callers 3

condenseFunction · 0.85
babel.jsFile · 0.85

Calls 2

minimatchFunction · 0.85
fFunction · 0.70

Tested by

no test coverage detected