Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@extra-array/middle-update

2.9.41 • Public • Published

Gets values from middle. 🏃 📼 📦 🌔 📒

Alternatives: middle, middle$.
Similar: left, middle, right.
This is part of package extra-array.

array.middle$(x, [i], [n]);
// x: an array (updated)
// i: start index (0)
// n: number of values (1)
// --> x
const array = require('extra-array');
 
var x = [1, 2, 3];
array.middle$(x, 1, 1);
// [ 2 ]
 
x;
// [ 2 ]
 
var x = [1, 2, 3];
array.middle$(x, 1, 2);
// [ 2, 3 ]

references

Install

npm i @extra-array/middle-update

DownloadsWeekly Downloads

7

Version

2.9.41

License

MIT

Unpacked Size

11.2 kB

Total Files

29

Last publish

Collaborators

  • avatar