UNPKG

@quinck/collections

Version:

Allows extra operations on JavaScript collections: Array, Map and Set.

9 lines (8 loc) 266 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Array.prototype.filterIf = function (isApplicable, predicate, thisArg) { const _self = this; if (isApplicable) return _self.filter(predicate, thisArg); return _self; };