You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
3 months ago | |
|---|---|---|
| .. | ||
| lib | 3 months ago | |
| test | 3 months ago | |
| .npmignore | 3 months ago | |
| LICENSE | 3 months ago | |
| README.md | 3 months ago | |
| package.json | 3 months ago | |
README.md
intersperse
Add an object to an array between each element.
Installation
npm install intersperse
Example
var intersperse = require('intersperse');
var arr = intersperse([1, 2, 3], 'a');
console.log(arr) // [1, 'a', 2, 'a', 3]