UNPKG

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.

19 lines 564 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dictionaryForEach = void 0; /** * @public * Like `Array.forEach` but for arbitrary objects. * * @remarks * See {@link dictionaryForEach}. */ function dictionaryForEach(dictionary, callback) { const keys = Object.keys(dictionary); for (let i = 0, iEnd = keys.length; i < iEnd; ++i) { const key = keys[i]; callback(dictionary[key], key, dictionary); } } exports.dictionaryForEach = dictionaryForEach; //# sourceMappingURL=dictionary-foreach.js.map