1.0.0 • Published 9 years ago

array-movetoend v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 years ago

array-movetoend Build Status

Moves an item the array at index to the end of the array.

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