Skip to main content
Module

x/rambda/pluck.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { pluck } from './pluck'
test('happy', () => { expect(pluck('a')([ { a : 1 }, { a : 2 }, { b : 1 } ])).toEqual([ 1, 2 ])})
test('with number', () => { const input = [ [ 1, 2 ], [ 3, 4 ], ]
expect(pluck(0, input)).toEqual([ 1, 3 ])})