UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

13 lines (8 loc) 289 B
import { cloneList } from './_internals/cloneList.js' export function append(x, input){ if (arguments.length === 1) return _input => append(x, _input) if (typeof input === 'string') return input.split('').concat(x) const clone = cloneList(input) clone.push(x) return clone }