Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
An array convenience subclass for javascript.
$ npm install arc-array --save
Accept an array, and if it is already an ArcArray return the same object, otherwise create a new ArcArray utilizing the passed in array
Create a new ArcArray
object. Requires new
Shuffles an array in place.
Returns a random element from the array
Iterates over an array like a map, but treating each callable as async, awaits for all to resolve like a Promise.all
const someArray = ArcArray.wrap([1,2,3]);
const someResolvedResponse = await someArray.pMap(async (val) => {
const response = await someRemoteCall(val);
return response;
})
Create a string based on the returned values from a callback on each index of an array.
callback is a function that receives each value of the array, and is expected to return a value that will be used to create the joined string.
//Example of joinCallback
const items = new ArcArray('item1','item2','item3');
const string = items.joinCallback(function(_val){
return '<li>'+_val+'</li>'
},'');
//String returned is: <li>item1</li><li>item2</li><li>item3</li>
npm test
FAQs
An array convenience subclass
We found that arc-array 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.