array-interlace

0.0.1 • Public • Published

array-interlace

Interlace the contents of an array

build status

Takes an array, splits it in half, then takes it in turns to push an item from each split array back onto a new array

Installation

npm install array-interlace --save

Usage

var arrayInterlace = require('array-interlace')
 
console.log(arrayInterlace([ 1, 2, 3, 4, 5, 6 ]))
// Array is [ 1, 4, 2, 5, 3, 6 ]

var interlacedArray = arrayInterlace(array)

Options must include:

  • array - an array to interlace

Credits

Dom Harrington

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i array-interlace

    Weekly Downloads

    3

    Version

    0.0.1

    License

    ISC

    Last publish

    Collaborators

    • domharrington