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.

17 lines 443 B
/** * @public * converts objects into key value pair tuples. * * @remarks * See {@link dictionaryPairs}. */ export function dictionaryPairs(dictionary) { const keys = Object.keys(dictionary); const pairs = new Array(keys.length); for (let i = 0, iEnd = keys.length; i < iEnd; ++i) { const key = keys[i]; pairs[i] = [key, dictionary[key]]; } return pairs; } //# sourceMappingURL=dictionary-pairs.js.map