
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
A Node Streams2 CSV parser
Will parse an input character stream and pass on an array for each line of CSV data.
csv2 can handle basic CSV quoting and escaping: foo,"bar","wut? ""whoa!""","commas, in, my, strings??"
The only main "feature" not currently supported is newlines within quoted strings; newlines are treated strictly as row separators.
fs.createReadStream('data.csv')
.pipe(csv2())
.on('data', console.log)
Or, use through2 to transform your CSV into JSON:
fs.createReadStream('data.csv')
.pipe(csv2())
.pipe(through2({ objectMode: true }, function (chunk, enc, callback) {
this.push({
name : chunk[0]
, address : chunk[3]
, phone : chunk[10]
})
callback()
}))
.on('data', console.log)
csv2([ options ])
The optional options
object is passed through to the stream.Through
class. You can supply a 'separator'
option to change the default separator from ','
to whatever your data is using.
csv2 is Copyright (c) 2013 Rod Vagg @rvagg and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
FAQs
A Node Streams2 CSV parser
The npm package csv2 receives a total of 861 weekly downloads. As such, csv2 popularity was classified as not popular.
We found that csv2 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.