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

utils/split-at
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
Build: fail
BuildFail
Build Status: fail
Splits a given list or string at a given index.

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/split-at in your project
npm i @bit/bit.ramda.utils.split-at
Copied

splitAt (index:Number, array:(Array | String)) : Array

Splits a given list or string at a given index.

Example

R.splitAt(1, [1, 2, 3]);          //=> [[1], [2, 3]]
     R.splitAt(5, 'hello world');      //=> ['hello', ' world']
     R.splitAt(-1, 'foobar');          //=> ['fooba', 'r']

Arguments

index: Number

The index where the array/string is split.

array: (Array | String)

The array/string to be split.

Returns

Array