]> git.r.bdr.sh - rbdr/dotfiles/blob
7a9e4c34736ca35d2d223f3facf8a2a17ba8a5ec
[rbdr/dotfiles] /
1 'use strict';
2
3 var toPosInt = require('../../number/to-pos-integer')
4 , value = require('../../object/valid-value')
5
6 , hasOwnProperty = Object.prototype.hasOwnProperty;
7
8 module.exports = function () {
9 var i, l;
10 if (!(l = toPosInt(value(this).length))) return null;
11 i = 0;
12 while (!hasOwnProperty.call(this, i)) {
13 if (++i === l) return null;
14 }
15 return i;
16 };