array-interweave
Produce a new array from two source arrays with alternating values from each source array.
Installation
$ npm install array-interweave --save
Usage
const interweave = const sourceA = 1 2 3 4 5const sourceB = 'A' 'B' 'C'const mergedResult = // => [1, 'A', 2, 'B', 3, 'C', 4, 5]
const interweave = const sourceA = 0x55 foo: 'bar' 'apples'const sourceB = 1 2 3 4 5const mergedResult = // => [0x55, 1, {foo: 'bar'}, 2, 'apples', 3, 4, 5]
Tests
iUnit tests use Mocha, Unit.js, and Istanbul
$ npm run test$ npm run test-html-cov # Will open HTML coverage report in Google Chrome on OSX
License
MIT