Module

x/rambda/immutable.d.ts>toPairs

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

It transforms an object to a list.

Type Parameters

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

Returns

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

Parameters

obj: Record<string | number, S>

Returns

ReadonlyArray<readonly [string, S]>