Skip to content

daviddias/pull-ndjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pull-ndjson

A pull-streams ndjson parser and serializer, inspired by and compatible with ndjson. Note: This module ends up being a very tiny wrapper around pull-strinfigy and pull-split, exposing the same API as ndjson.

Table of Contents

Install

> npm install pull-ndjson

Examples

Serialize and Deserialize

const ndjson = require('ndjson')

pull(
  pull.values([{ a: 1 }]),
  ndjson.serialize(),
  ndjson.parse(),
  pull.collect((err, values) => {
    if (err) {
      throw err
    }
    console.log(values)
    // [{ a: 1}]
  })
)

Contribute

PRs are welcome!

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © David Dias

About

A pull-streams ndjson parser and serializer, inspired by and compatible with [ndjson](https://www.npmjs.com/package/ndjson).

Resources

License

Stars

Watchers

Forks

Packages

No packages published