Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

@extra-iterable/splice.min

Package Overview
Dependencies
0
Maintainers
1
Versions
199
Issues
File Explorer

Advanced tools

@extra-iterable/splice.min

Removes or replaces existing values.

    2.5.22latest

Version published
Maintainers
1
Yearly downloads
6,862
decreased by-57.03%

Weekly downloads

Readme

Source

Removes or replaces existing values. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

This is part of package extra-iterable.

This is browserified, minified version of @extra-iterable/splice.
It is exported as global variable iterable_splice.
CDN: unpkg, jsDelivr.


iterable.splice(x, [i], [n], ...vs); // x: an iterable // i: remove index (0) // n: number of values to remove (rest) // vs: values to insert const iterable = require("extra-iterable"); var x = [1, 2, 3, 4, 5]; [...iterable.splice(x, 2)]; // [ 1, 2 ] [...iterable.splice(x, 2, 2)]; // [ 1, 2, 5 ] [...iterable.splice(x, 2, 2, 30, 40)]; // [ 1, 2, 30, 40, 5 ]

References

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc