
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
sweet-array-slice
Advanced tools
sweet.js macro for array slicing, specifically to deal with the cost of argument slicing
sweet.js macro for array slice. It's specifically intended to deal with deoptimization due to arguments slicing.
npm install sweet-array-slice sweet
npm install -g sweet.js # if you don't already have sweet.js
sjs -m sweet-array-slice <your-sweet-code>
// test.js
// example 1
var a = arraySlice(arguments);
// example 2
var b = arraySlice(arguments, 1);
// example 3
var c = arraySlice(arguments, 1, 2);
// example 1
var length$311 = arguments.length;
var a$312 = new Array(length$311);
for (var i$313 = 0; i$313 < length$311; i$313++) {
a$312[i$313] = arguments[i$313];
}
// example 2
var length$315 = arguments.length;
var start$316 = Math.min(1, length$315 - 1);
var b$317 = new Array(length$315 - start$316);
for (var i$318 = start$316; i$318 < length$315; i$318++) {
b$317[i$318] = arguments[i$318];
}
// example 3
var length$320 = arguments.length;
var start$321 = Math.min(1, length$320 - 1);
var end$322 = Math.min(2, length$320);
var c$323 = new Array(end$322 - start$321);
for (var i$324 = start$321; i$324 < end$322; i$324++) {
c$323[i$324] = arguments[i$324];
}
FAQs
sweet.js macro for array slicing, specifically to deal with the cost of argument slicing
The npm package sweet-array-slice receives a total of 2 weekly downloads. As such, sweet-array-slice popularity was classified as not popular.
We found that sweet-array-slice 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.