deno.land / x / rambda@v9.1.1 / source / pluck.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { map } from './map.js'
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}
rambda

Version Info

Tagged at
2 months ago