Skip to main content
Module

x/rambda/source/pluck.js

Faster and smaller alternative to Ramda
Go to Latest
File
import {map} from './map'
export function pluck(property, list) { if (arguments.length === 1) return _list => pluck(property, _list)
const willReturn = []
map(x => { if (x[property] !== undefined) { willReturn.push(x[property]) } }, list)
return willReturn}