Skip to main content
Module

x/fae/fromPairs.ts>fromPairs

A functional module for Deno inspired from Ramda.
Latest
function fromPairs
import { fromPairs } from "https://deno.land/x/fae@v1.1.1/fromPairs.ts";

Creates a new object from a list key-value pairs. If a key appears in multiple pairs, the rightmost pair is included in the object.

 Fae.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3}

Parameters

pairs: Pair<T>[]