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.

21 lines 590 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dictionaryPairs = void 0; /** * @public * converts objects into key value pair tuples. * * @remarks * See {@link dictionaryPairs}. */ 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; } exports.dictionaryPairs = dictionaryPairs; //# sourceMappingURL=dictionary-pairs.js.map