Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
matrixarray
Advanced tools
The MatrixArray module makes working with large two dimensional arrays in JavaScript easy and seamless. Using MatrixArray you don't have to worry about deep cloning or the intricacies of managing a buffer. Arrays passed into MatrixArray are flattened and stored in an ArrayBuffer for efficiency.
let data = new MatrixArray([[1, 2], [3, 4]])
console.log(data.row(0)[1]) // returns 2
console.log(data.clone()) // returns a new Float32Array [[1, 2], [3, 4]]
console.log(data.value(1, 1)) // returns 4
let dataCompact: any = data.compact() // returns [[1, 2], [3, 4]]
dataCompact[0] = '9'
console.log(dataCompact) // returns [9, [3,4]]
console.log(data.row(0)) // returns [1, 2]
See tests/usage.ts for an example on how to MatrixArray with NodeJS and Typescript.
In the project directory, you can run:
npm run build
Builds matrixArray.ts and tests/usage.ts into JS files for usage. usage.ts is a demo of the script being used in Typescript.
npm run test-usage
Runs the sample usage.js file which should output a log in your console.
You can learn more about the developer here.
FAQs
MatrixArray for TypeScript/JavaScript
The npm package matrixarray receives a total of 1 weekly downloads. As such, matrixarray popularity was classified as not popular.
We found that matrixarray 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.