polyfill.filter.js
525 Bytes
(function(a){"filter"in Array.prototype||(Array.prototype.filter=function(c){if(this===a||null===this)throw new TypeError(this+" is not an object");if(!(c instanceof Function))throw new TypeError(c+" is not a function");for(var j,d=Object(this),e=arguments[1],f=d instanceof String?d.split(""):d,g=Math.max(Math.min(f.length,9007199254740991),0)||0,h=-1,i=[];++h<g;)j=f[h],h in f&&c.call(e,j,h,d)&&i.push(j);return i})}).call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});