You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

csv-parser-sync-plus-promise

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-parser-sync-plus-promise

parse any csv synchronously or as promise

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Description:

csv-parser-sync-plus-promise

A csv parser to read csv synchronously or as promise and converts it to an array of properties

Features

now read any csv synchronously or as promise. Choice is yours

This npm csv parser reads csv files synchronously or as a promise to an array

Reading csv synchronously was always hectic, but now its easier and faster.

Demo CSV:

a,b,c
1,2,3
1,5,6
2,4,6

Output Array

[ { a: '1', b: '2', c: '3' },
  { a: '1', b: '5', c: '6' },
  { a: '2', b: '4', c: '5' } ]

Usage

	let parser = require('csv-parser-sync-plus-promise')

for use as sync

	let a=parser.readCsvSync('<filepath>')

for use as promise

	let b=parser.readCsvPromise('<filepath>')

Note: You can use both fully qualified and relative paths

Errors

All errors will be printed as console.error and the process will exit with exit code 222

Keywords

sync

FAQs

Package last updated on 26 Jan 2020

Did you know?

Socket

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