interposejs

0.0.2 • Public • Published

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

/interposejs/

    Package Sidebar

    Install

    npm i interposejs

    Weekly Downloads

    4

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • jiang-di