tahamajs's picture
download
raw
741 Bytes
var _optimizeCb = require('./_optimizeCb.js');
var _isArrayLike = require('./_isArrayLike.js');
var keys = require('./keys.js');
// The cornerstone for collection functions, an `each`
// implementation, aka `forEach`.
// Handles raw objects in addition to array-likes. Treats all
// sparse array-likes as if they were dense.
function each(obj, iteratee, context) {
iteratee = _optimizeCb(iteratee, context);
var i, length;
if (_isArrayLike(obj)) {
for (i = 0, length = obj.length; i < length; i++) {
iteratee(obj[i], i, obj);
}
} else {
var _keys = keys(obj);
for (i = 0, length = _keys.length; i < length; i++) {
iteratee(obj[_keys[i]], _keys[i], obj);
}
}
return obj;
}
module.exports = each;

Xet Storage Details

Size:
741 Bytes
·
Xet hash:
deba6a93f7229642819570d115aaf54a24f4bd4f35d878122a900fb048dca103

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.