Adds values to the start.
:package:
:smileycat:
:running:
:vhs:
:moon:
:scroll:
:newspaper:
:bluebook:
Similar: push, pop, shift, unshift.
This is part of package extra-iterable.
This is browserified, minified version of @extra-iterable/unshift.
It is exported as global variable iterableunshift.
CDN: unpkg, jsDelivr.
iterable.unshift(x, ...vs);
// x: an iterable
// vs: values to add
const iterable = require("extra-iterable");
var x = [3, 4];
[...iterable.unshift(x, 2)];
// [ 2, 3, 4 ]
[...iterable.unshift(x, 1, 2)];
// [ 1, 2, 3, 4 ]