Module

x/rambda/index.d.ts>toPairs

Faster and smaller alternative to Ramda
Go to Latest
function toPairs
import { toPairs } from "https://dotland.deno.dev/x/rambda@v9.2.0/index.d.ts";

It transforms an object to a list.

Type Parameters

O extends object
K extends Extract<keyof O, string | number>

Returns

Array<[key in K]: [`${key}`, O[key]][K]>

Parameters

obj: Record<string | number, S>

Returns

Array<[string, S]>