Sha256: 86a611b7d557adb052b534aef69f17defed6d444304b5b0b8ec087541a7e0367
Contents?: true
Size: 699 Bytes
Versions: 8
Compression:
Stored size: 699 Bytes
Contents
// MSIE 8 doesn't support Array.prototype.filter // From: http://stackoverflow.com/questions/2722159/javascript-how-to-filter-object-array-based-on-attributes // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/filter if (!Array.prototype.filter) { Array.prototype.filter = function(fun /*, thisp*/) { var len = this.length >>> 0; if (typeof fun != "function") throw new TypeError(); var res = []; var thisp = arguments[1]; for (var i = 0; i < len; i++) { if (i in this) { var val = this[i]; // in case fun mutates this if (fun.call(thisp, val, i, this)) res.push(val); } } return res; }; }
Version data entries
8 entries across 8 versions & 1 rubygems