Returns a new array with a value prepended to the beginning.
const base = [2, 3] as const;const prefixed = Arr.toUnshifted(base, 1);const prefixedCurried = Arr.toUnshifted(0)(base);assert.deepStrictEqual(prefixed, [1, 2, 3]);assert.deepStrictEqual(prefixedCurried, [0, 2, 3]); Copy
const base = [2, 3] as const;const prefixed = Arr.toUnshifted(base, 1);const prefixedCurried = Arr.toUnshifted(0)(base);assert.deepStrictEqual(prefixed, [1, 2, 3]);assert.deepStrictEqual(prefixedCurried, [0, 2, 3]);
Returns a new array with a value prepended to the beginning.