UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

7 lines (5 loc) 216 B
import { Dictionary, getValueOr } from "./main.ts"; export function toPairs<A = any>(dict: Dictionary<A>): [string, A][] { const dd = getValueOr({}, dict); return Object.keys(dd).map((key) => [key, dd[key]]); }