]> git.r.bdr.sh - rbdr/dotfiles/blob
2f0ffaea84cb389e4d91a05aae5a50313a155d67
[rbdr/dotfiles] /
1 'use strict';
2
3 var toPosInt = require('../../number/to-pos-integer')
4 , callable = require('../../object/valid-callable')
5 , value = require('../../object/valid-value')
6
7 , hasOwnProperty = Object.prototype.hasOwnProperty
8 , call = Function.prototype.call;
9
10 module.exports = function (cb/*, thisArg*/) {
11 var i, self, thisArg;
12
13 self = Object(value(this));
14 callable(cb);
15 thisArg = arguments[1];
16
17 for (i = toPosInt(self.length); i >= 0; --i) {
18 if (hasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self);
19 }
20 };