hkt-toolbelt
Version:
Functional and composable type utilities
18 lines (17 loc) • 467 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.entries = void 0;
/**
* Given a record, return a list of key-value pairs.
*
* @param {Record<PropertyKey, unknown>} x - The record to get the entries of.
*
* @example
* ```ts
* import { Object } from "hkt-toolbelt";
*
* const result = Object.entries({ foo: 'bar', baz: 42 })
* // ^? [['foo', 'bar'], ['baz', 42]]
* ```
*/
exports.entries = ((x) => Object.entries(x));