Socket
Socket
Sign inDemoInstall

parse-csv-simple

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.5 to 1.0.6

2

dist/index.js

@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

root["CSVParser"] = factory();
})(self, function() {
})(this, function() {
return /******/ (() => { // webpackBootstrap

@@ -13,0 +13,0 @@ /******/ "use strict";

{
"name": "parse-csv-simple",
"version": "1.0.5",
"version": "1.0.6",
"description": "A parser for csv file.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -8,6 +8,28 @@ # parse-csv-simple

### parse the whole csv string directly
```js
var {parse} = require('parse-csv-simple');
var csvText = 'csv text ...';
parse(csvText);
var csvText = 'name,age,gender\nJenny,21,female';
parse(csvText); // [['name', 'age', 'gender'], ['Jenny', '21', 'female']]
```
### get an iterable object, you can control the iterate flow.
```js
var {parseIterable} = require('parse-csv-simple');
var csvText = 'name,age,gender\nJenny,21,female';
var iteratableObj = parseIterable(csvText);
for (var row of iteratableObj) {
// do something
}
```
### custom the delimiter or rows to parse
```js
var {parse} = require('parse-csv-simple');
var csvText = 'name,age,gender\nJenny,21,female';
var iteratableObj = parse(csvText, { delimiter: '...', limit: 100 });
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc