array-movetoend
v1.0.0
Published
Moves an item the array to the end of the array.
Downloads
2
Readme
array-movetoend
Moves an item the
array
atindex
to the end of thearray
.
Install
$ npm install --save array-movetoend
Usage
var moveToEnd = require('array-movetoend');
moveToEnd([1, 2, 3, 4], 1)
// => [1, 3, 4, 2]
API
moveToEnd(array, index)
Returns the modified array.
array
Type: array
The array to modify.
index
Type: index
Position where the item is.
License
MIT © Emil Johansson