
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
immutable-splice
Advanced tools
Changes the contents of an array or string by removing or replacing existing elements and/or adding new elements.
Based off the Array.prototype.splice()
method—but immutable.
splice(input, start)
splice(input, start, deleteCount)
splice(input, start, deleteCount, item1, item2, ...)
input
the Array
or String
to splice.
start
Number
index at which to start changing the input
.
deleteCount
optional Number
of elements in the array to remove from start
.
If deleteCount
is omitted, then all the elements from start
to the end of the input
will be deleted.
item1, item2, ...
optional elements to add to the input
, beginning from start
.
A new Array
or String
containing the changes made.
import splice from 'immutable-splice';
splice(['foo', 'bar', 'baz'], 1, 1);
// returns ['foo', 'baz']
splice('cool', 1, 2, '0', 'O');
// returns 'c0Ol'
FAQs
Immutable splice function for arrays and strings.
The npm package immutable-splice receives a total of 11 weekly downloads. As such, immutable-splice popularity was classified as not popular.
We found that immutable-splice demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.