Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/mod.ts>toPairs

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