JSPM

@extra-array/unshift-update.min

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

Adds values to the start.

Package Exports

  • @extra-array/unshift-update.min

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@extra-array/unshift-update.min) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Adds values to the start.

Alternatives: default, update.
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