rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
18 lines • 514 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.arrayForEach = void 0;
/**
* @public
* Like `Array.forEach`.
* @remarks
* Has more consistent performance characteristics cross-platform than the built-in `Array.forEach`.
*
* See {@link arrayForEach}.
*/
function arrayForEach(items, callback) {
for (let i = 0, iEnd = items.length; i < iEnd; ++i) {
callback(items[i], i);
}
}
exports.arrayForEach = arrayForEach;
//# sourceMappingURL=array-for-each.js.map