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

x/rambda/rambda.js>toPairs

Faster and smaller alternative to Ramda
Latest
function toPairs
import { toPairs } from "https://deno.land/x/rambda@9.3.0/rambda.js";

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]>