Nightly Patch Machine

    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

    Install

    npm i array-movetoend

    DownloadsWeekly Downloads

    7

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • emiljohansson