JSPM

@extra-array/unshift-update.min

2.8.39
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q90911F
  • License MIT

Adds values to the start.

Package Exports

  • @extra-array/unshift-update.min

Readme

Adds values to the start. 🏃 📼 📦 🌔 📒

Alternatives: unshift, unshift$.
Similar: push, pop, shift, unshift.
This is part of package extra-array.

This is browserified, minified version of @extra-array/unshift-update.
It is exported as global variable array_unshift$.
CDN: unpkg, jsDelivr.

array.unshift$(x, ...vs);
// x:  an array (updated)
// vs: values to add
// --> x
const array = require('extra-array');

var x = [3, 4];
array.unshift$(x, 2);
// [ 2, 3, 4 ]

x;
// [ 2, 3, 4 ]

var x = [3, 4];
array.unshift$(x, 1, 2);
// [ 1, 2, 3, 4 ]

references