Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Parse a text-file and convert it to an array of XY points.
Maintained by Zakodium
$ npm install --save xy-parser
import { parseXY } from 'xy-parser';
const data = `My file
1 2
3 4
5 6
7 8`;
const result = parseXY(data);
/* result ->
{
x: [1, 3, 5, 7],
y: [2, 4, 6, 8]
}
}
*/
const result2 = parseXYAndKeppInfo(data);
/* result2 ->
data: {
x: [1, 3, 5, 7],
y: [2, 4, 6, 8]
},
info: [
'My file'
]
}
*/
The bestGuess
option will try to determine which columns should be used.
If there are 3 columns and the first column is a sequential number starting at '1' it looks like this is a line number, we will ignore it.
If there are many columns maybe we have a format like X1, Y1, X2, Y2, ... in this cases if one column on two is a monotone series we will parse it correctly.
FAQs
Parse a text-file and convert it to an array of XY points
The npm package xy-parser receives a total of 1,119 weekly downloads. As such, xy-parser popularity was classified as popular.
We found that xy-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.