Skip to content

es

Strict-typed, shorthand Object.entries

Usage

ts
import { es } from 'tsu'

const object = { frog: 'good', toad: 'bad' }

es(object)
// [['frog', 'good'], ['toad', 'bad']]

Type Definitions

ts
/**
 * @param obj - The object to extract the entries from.
 * @returns The entries.
 */
function es<T extends object>(obj: T): [keyof T, T[keyof T]][]

Released under the MIT License.