UNPKG

420 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3function filterInPlace(array, test, context) {
4 var target = 0;
5 array.forEach(function (elem, i) {
6 if (test.call(this, elem, i, array)) {
7 array[target++] = elem;
8 }
9 }, context);
10 array.length = target;
11 return array;
12}
13exports.filterInPlace = filterInPlace;
14//# sourceMappingURL=filterInPlace.js.map
\No newline at end of file