UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

8 lines (5 loc) 204 B
export function prepend(x, input){ if (arguments.length === 1) return _input => prepend(x, _input) if (typeof input === 'string') return [ x ].concat(input.split('')) return [ x ].concat(input) }