Module

x/rambda/mod.ts>toPairs

Faster and smaller alternative to Ramda
Latest
function toPairs
import { toPairs } from "https://dotland.deno.dev/x/rambda@9.4.1/mod.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]>