0.0.2 • Published 8 years ago
interposejs v0.0.2
interposejs
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