summaryrefslogblamecommitdiff
path: root/node_modules/moment/src/lib/utils/some.js
blob: 7c0dd392b8226a46ecddfc6ee3893c997b52446e (plain) (tree)



















                                                       
var some;
if (Array.prototype.some) {
    some = Array.prototype.some;
} else {
    some = function (fun) {
        var t = Object(this),
            len = t.length >>> 0,
            i;

        for (i = 0; i < len; i++) {
            if (i in t && fun.call(this, t[i], i, t)) {
                return true;
            }
        }

        return false;
    };
}

export { some as default };