🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

parse-input-stream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-input-stream

[![NPM](https://nodei.co/npm/parse-input-stream.png)](https://nodei.co/npm/parse-input-stream/)

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
24
-29.41%
Maintainers
1
Weekly downloads
 
Created
Source

parse-input-stream

dat

Parse a tabular input stream. Can be used to pipe a buffered stream and attempts to parse it as a table -- csv, json, objects, or ndjson are supported.

npm install -g parse-input-stream

For CSV files, it will attempt to guess the delimiter. Quoted csvs work!

For JSON files, the selector will be auto-detected. Experimental.

Example

var parseInputStream = require('parse-input-stream')

var inputStream = fs.createReadStream('/path/to/file.csv')

var args = {
  "format": "csv"
}

inputStream.pipe(parseInputStream(args)).pipe(process.stdout)

Options

format: string. attempt to parse the stream into the given format. support 'json', 'objects', 'csv', or 'tsv'

detectMax: number. the maximum buffer amount to pre-read in order to detect the file type, delimiter, etc. Default 8000

FAQs

Package last updated on 07 Aug 2015

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