Insert an item between array elements
Insert an item between array elements
npm i @selrond/knit
Using ES Modules:
import { knit } from '@selrond/knit'
knit([1,2,3], '🎉') // [ 1, '🎉', 2, '🎉', 3 ]
Using CommonJS:
const { knit } = require('@selrond/knit')
knit([1,2,3], '🎉') // [ 1, '🎉', 2, '🎉', 3 ]