Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 26, 2024 via pnpm

csv-parser 1.7.0

Streaming CSV parser that aims for maximum speed as well as compatibility with the csv-spectrum test suite
Package summary
Share
0
issues
3
licenses
14
MIT
3
ISC
2
BSD-3-Clause
Package created
16 May 2014
Version published
22 Jun 2015
Maintainers
4
Total deps
19
Direct deps
5
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
14 Packages, Including:
core-util-is@1.0.3
generate-function@1.1.0
generate-object-property@1.2.0
is-property@1.0.2
isarray@1.0.0
minimist@0.2.4
minimist@1.2.8
process-nextick-args@2.0.1
readable-stream@2.3.8
safe-buffer@5.1.2
string_decoder@1.1.1
through2@2.0.5
util-deprecate@1.0.2
xtend@4.0.2

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
inherits@2.0.4
json-stringify-safe@5.0.1
split2@2.2.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
csv-parser@1.7.0
ndjson@1.5.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of csv-parser 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
generate-function1.1.02.1 kBMIT
prod
generate-object-property1.2.01.6 kBMIT
prod
inherits2.0.41.98 kBISC
prod
minimist0.2.414.06 kBMIT
prod
ndjson1.5.02.1 kBBSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does csv-parser do?

The "csv-parser" npm package is a convenient and ultra-fast library for parsing CSV files. It converts CSV into JSON at a rate of roughly 90,000 rows per second. CSV-parser is not only prized for its speed but also for its compatibility with the csv-spectrum CSV acid test suite. Whether you're operating in a Node environment or using it in the browser with browserify, this module has you covered.

How do you use csv-parser?

Using the csv-parser is quite straightforward. Start by installing the package with npm or yarn.

$ npm install csv-parser

or

$ yarn add csv-parser

Once the csv-parser module is installed, you can proceed with implementing it in your JavaScript code as shown below:

// Import the necessary modules
const csv = require('csv-parser')
const fs = require('fs')

// Declare an array to store the parsed data
const results = [];

fs.createReadStream('data.csv') // Create a readable stream to a CSV file
  .pipe(csv())              // Pipe the stream to csv-parser
  .on('data', (data) => results.push(data)) // On 'data', push the data into the results array
  .on('end', () => {         // On 'end', log the results
    console.log(results);  
  });

The csv-parser function accepts an object argument which allows you to specify options. For example:

csv({ separator: '\t' });  // to specify a tab character as the separator

Where are the csv-parser docs?

For detailed information and advanced usage, you can access the csv-parser documentation on its GitHub repository at https://github.com/mafintosh/csv-parser. The documentation provides a comprehensive overview of the API, including various options you can set and events you can listen to when using csv-parser. Also, you will find useful information on how to use the CLI provided by the module and how to deal with encoding issues and Byte Order Marks.