UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

14 lines (11 loc) 224 B
export function pluck(property) { return list => { const willReturn = [] list.forEach(x => { if (x[property] !== undefined) { willReturn.push(x[property]) } }) return willReturn } }