array-movetoend

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2

Package Sidebar

Install

npm i array-movetoend

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • emiljohansson