intersperse
Add an object to an array between each element
Last updated 12 years ago by curvedmark .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install intersperse 
SYNC missed versions from official npm registry.

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]

Current Tags

  • 1.0.0                                ...           latest (12 years ago)

1 Versions

  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 3
Last Month 4
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |