Skip to main content
Module

x/fae/mod.ts>pluck

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

Returns a new list by plucking the same named property off all objects in the list supplied.

 let getAges = Fae.pluck('age')
 getAges([{name: 'shubham', age: 22}, {name: 'shivam', age: 23}]) //=> [22, 23]

 Fae.pluck(0, [[1, 2], [3, 4]])               //=> [1, 3]
 Fae.pluck('val', {a: {val: 3}, b: {val: 5}}) //=> {a: 3, b: 5}

type

Pluck