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
Create a new ArcArray
object. Requires new
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
var items = new ArcArray('item1','item2','item3');
var string = items.joinCallback(function(_val){
return '<li>'+_val+'</li>'
},'');
//String returned is: <li>item1</li><li>item2</li><li>item3</li>
###ArcArray.nativeBind() This is a static method that binds a method to the native global array prototype that transforms any array into an ArcArray object. This has a global effect and should be used carefully.
ArcArray.nativeBind();
var items = [1,'a','b',false].arc(); //This returns an ArcArray object
###ArcArray.wrap(array:Array) Accept an array, and if it is already an ArcArray return the same object, otherwise create a new ArcArray utilizing the passed in array
##Testing
npm test
FAQs
An array convenience subclass
The npm package arc-array receives a total of 1,278 weekly downloads. As such, arc-array popularity was classified as popular.
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.