split-every

split a list in length-n pieces

npm install split-every
2 downloads in the last week
5 downloads in the last month

split-every build status

split a list in length-n pieces

Example

var splitEvery = require("split-every")
    , assert = require("assert")

var listOfTuples = splitEvery(2, [1,2,3,4,5,6])

assert.equal(listOfTuples, [[1,2], [3,4], [5,6]])

Installation

npm install split-every

Tests

make test

Contributors

  • Raynos

MIT Licenced

npm loves you