papaparse
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
Papa Parse is a fast and powerful CSV parser for JavaScript, designed specifically for browser use. It supports web workers and can stream large files. In addition to parsing CSV files directly (both local and over the network), Papa Parse can convert CSV to JSON and vice versa. Furthermore, it comes with an auto-detection feature for delimiters and offers worker threads to keep web pages responsive. It also provides support for header rows and enables pause, resume, and abort operations. Remarkably, Papa Parse doesn't have any dependencies, not even jQuery.
To use Papa Parse, you can install it via npm using the command npm install papaparse
. If you prefer not to use npm, you can directly download the papaparse.min.js
file to your project source from https://unpkg.com/papaparse@latest/papaparse.min.js. In a Node.js environment, Papa Parse can parse a Readable Stream instead of a File, and it also supports node-style streaming with the .pipe
method. A sample usage can be:
let Papa = require('papaparse');
let csvData = `"column1","column2"
"value1","value2"`;
let results = Papa.parse(csvData);
console.log(results.data);
Papa Parse offers comprehensive documentation, which contains more detailed information on how to use the package and provides further examples. The documentation can be found at http://papaparse.com/docs. The package's GitHub repository documentation mholt/PapaParse also provides additional details on its usage and features.