Skip to main content
Module

x/rambda/intersperse.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { intersperse } from './intersperse'
test('intersperse', () => { const list = [ { id : 1 }, { id : 2 }, { id : 10 }, { id : 'a' } ] expect(intersperse('!', list)).toEqual([ { id : 1 }, '!', { id : 2 }, '!', { id : 10 }, '!', { id : 'a' }, ])
expect(intersperse('!')([])).toEqual([])})