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

    parse-csv-simple

A parser for csv file.


Version published
Weekly downloads
6
increased by500%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

parse-csv-simple

A parser for csv file.

Usage

Import the library in your code

parse the whole csv string directly

var {parse} = require('parse-csv-simple');
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.

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

var {parse} = require('parse-csv-simple');
var csvText = 'name,age,gender\nJenny,21,female';
var iteratableObj = parse(csvText, { delimiter: '...', limit: 100 });

Keywords

FAQs

Last updated on 15 Jul 2021

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.

Install

Related posts

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