insert-all

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
966 B
Inserts the sub-list into the list, at the specified `index`.
1 contributor
Install insert-all as a package?
Copied
npm i @bit/justin-capalbo.ramda.insert-all
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
insertAll (
index:Number,
elts:Array,
list:Array
) : Array

Inserts the sub-list into the list, at the specified index. Note that this is not destructive: it returns a copy of the list with the changes. No lists have been harmed in the application of this function.

Example
R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4]
Arguments
index: Number

The position to insert the sub-list

elts: Array

The sub-list to insert into the Array

list: Array

The list to insert the sub-list into

Returns
Array

A new Array with `elts` inserted starting at `index`.

Help and resources