Share your code. Components are building blocks, you are the architect.

utils/take
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
Build: fail
BuildFail
Build Status: fail
Returns the first `n` elements of the given list, string, or

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/take in your project
npm i @bit/bit.ramda.utils.take
Copied

take (n:Number, list:*) : *

Returns the first n elements of the given list, string, or transducer/transformer (or object with a take method).

Dispatches to the take method of the second argument, if present.

Example

R.take(1, ['foo', 'bar', 'baz']); //=> ['foo']
     R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']
     R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']
     R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']
     R.take(3, 'ramda');               //=> 'ram'

     var personnel = [
       'Dave Brubeck',
       'Paul Desmond',
       'Eugene Wright',
       'Joe Morello',
       'Gerry Mulligan',
       'Bob Bates',
       'Joe Dodge',
       'Ron Crotty'
     ];

     var takeFive = R.take(5);
     takeFive(personnel);
     //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan']

Arguments

n: Number

list: *

Returns

*