1.0.0 • Published 11 years ago

intersperse v1.0.0

Weekly downloads
34,670
License
-
Repository
github
Last release
11 years ago

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]