jellyfish-web/dashboard-ui/bower_components/emby-webcomponents/polyfills/array.js
2018-10-23 01:05:09 +03:00

12 lines
No EOL
436 B
JavaScript

Array.prototype.filter || (Array.prototype.filter = function(fun) {
"use strict";
if (null == this) throw new TypeError;
var t = Object(this),
len = t.length >>> 0;
if ("function" != typeof fun) throw new TypeError;
for (var res = [], thisp = arguments[1], i = 0; i < len; i++)
if (i in t) {
var val = t[i];
fun.call(thisp, val, i, t) && res.push(val)
} return res
});