| import optimizeCb from './_optimizeCb.js'; | |
| import isArrayLike from './_isArrayLike.js'; | |
| import keys from './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. | |
| export default 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; | |
| } | |
Xet Storage Details
- Size:
- 719 Bytes
- Xet hash:
- 628e407e6f344310d8b7509791f9419f731637c9d955423ee614519708213259
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.