@extra-lists/shift

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

Usage no npm install needed!

<script type="module">
  import extraListsShift from 'https://cdn.skypack.dev/@extra-lists/shift';
</script>

README

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

This is part of package extra-lists.


lists.shift(x);
// x: lists
const lists = require('extra-lists');

var x = [['a', 'b', 'c'], [1, 2, 3]];
lists.shift(x).map(c => [...c]);
// [ [ 'b', 'c' ], [ 2, 3 ] ]

var x = [['a', 'b', 'c', 'd'], [1, 2, 3, 4]];
lists.shift(x).map(c => [...c]);
// [ [ 'b', 'c', 'd' ], [ 2, 3, 4 ] ]


References