UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

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) }