Skip to main content
Module

x/rambda/prepend.js

Faster and smaller alternative to Ramda
Go to Latest
File
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)}