Add an object to an array between each element
Add an object to an array between each element.
npm install intersperse
var intersperse = require('intersperse');var arr = intersperse([1, 2, 3], 'a'); console.log(arr) // [1, 'a', 2, 'a', 3]
With npm private modules, you can use the npm registry to host your own private code and the npm command line to manage it. Learn more…
how? learn more