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.
A nicer command line csv tool than cut -d , -f 1,2,3
This is a command line tool, so install it globally so it's available on your path:
npm install --global csvfmt
Provide files on the command line to parse. csvparse gives you a JSON representation of your CSV file (Useful with jq)
$ csvfmt samples/people.csv
["name","sex","age"]
["morris","m","12"]
["jenna","f","13"]
["yarris","c","200"]
csvfmt reads CSV files from its standard input stream if no files are specified.
--headers parses headers, and returns objects instead of arrays:
$ csvfmt --headers samples/people.csv
{"name":"morris","sex":"m","age":"12"}
{"name":"jenna","sex":"f","age":"13"}
{"name":"yarris","sex":"c","age":"200"}
...which makes it quite handy with jq:
$ csvfmt samples/people.csv --headers | jq 'select(.age | tonumber < 100)'
{
"name": "morris",
"sex": "m",
"age": "12"
}
{
"name": "jenna",
"sex": "f",
"age": "13"
}
--format lets you specify sprintf style formatting:
$ csvfmt samples/people.csv --headers --format '%(age)4d %(sex)s %(name)s'
12 m morris
13 f jenna
200 c yarris
You can also use positional indexes:
$ csvfmt samples/people.csv --format '%2$s %1$s'
sex name
m morris
f jenna
c yarris
FAQs
A nicer command line csv tool than `cut -d , -f 1,2,3`
The npm package csvfmt receives a total of 0 weekly downloads. As such, csvfmt popularity was classified as not popular.
We found that csvfmt 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 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.