0.0.2 • Published 8 years ago

interposejs v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

interposejs Build Status

Clojure's function interpose in JavaScript

Install

$ npm install --save interposejs

Usage

const interpose = require('interposejs');

interpose(0, [1, 2, 3]) // [1, 0, 2, 0, 3]

// also support array-like objects
interpose('x', 'abc') // [ 'a', 'x', 'b', 'x', 'c' ]

API

interpose(sep, arr)

sep is the separator, arr is an array or array-like objects.

License

MIT © JIANG Di