@extra-array/remove-path-update.min
TypeScript icon, indicating that this package has built-in type declarations

2.10.19 • Public • Published

Removes value at path in a nested array. 📦 😺 🏃 📼 🌔 📜 📰 📘

Alternatives: remove, remove$, removePath$.
Similar: hasPath, getPath, setPath$, removePath$.
Similar: get, set, remove.

This is part of package extra-array.

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


array.removePath$(x, p);
// x: a nested array (updated)
// p: path
// → x
const array = require("extra-array");

var x = [[2, 4], 6, 8];
array.removePath$(x, [1], 60);
// [ [ 2, 4 ], 8 ]

x;
// [ [ 2, 4 ], 8 ]

array.removePath$(x, [0, 1], 40);
// [ [ 2 ], 8 ]

array.removePath$(x, [0, 1, 2], 100);
// [ [ 2 ], 8 ] (path not present, no effect)


References

Package Sidebar

Install

npm i @extra-array/remove-path-update.min

Weekly Downloads

88

Version

2.10.19

License

MIT

Unpacked Size

6.12 kB

Total Files

8

Last publish

Collaborators

  • wolfram77