@newdash/newdash
Version:
javascript/typescript utility library
21 lines (20 loc) • 476 B
TypeScript
import { Entry } from "./types";
/**
* The inverse of `entries`is method returns an object composed
* from key-value `pairs`.
*
* @since 5.10.0
* @category Array
* @param {Array} pairs The key-value pairs.
* @returns {Object} Returns the new object.
* @example
*
* ```js
* fromEntries([['a', 1], ['b', 2]])
* // => { 'a': 1, 'b': 2 }
* ```
*/
export declare function fromEntries<T>(pairs: Array<Entry<T>>): {
[key: string]: T;
};
export default fromEntries;