@extra-array/shift-update.min

Removes first value. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Usage no npm install needed!

<script type="module">
  import extraArrayShiftUpdateMin from 'https://cdn.skypack.dev/@extra-array/shift-update.min';
</script>

README

Removes first value. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Alternatives: shift, shift$.
Similar: push, pop, shift, unshift.

This is part of package extra-array.

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


array.shift$(x);
// x: an array (updated)
// → x
const array = require("extra-array");

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

x;
// [2, 3]

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


References