Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-to-ndjson

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-to-ndjson

Convert an array of objects to ndjson format

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
855
increased by8.23%
Maintainers
1
Weekly downloads
 
Created
Source

array-to-ndjson Build Status

Convert an array of objects to a stream of ndjson data.

Install

$ npm install array-to-ndjson

Usage

const arrayToNdjson = require('array-to-ndjson');

arrayToNdjson([{name: 'Foo', value: 10}]);
	// => Readable Stream


// Example piping the stream

arrayToNdjson([{name: 'Foo', value: 10}, {name: 'Bar', value: 9}]).pipe(fs.createWriteStream('foo.json'))
	// => File will contain:
	// {"name":"Foo","value":10}
	// {"name":"Bar","value":9}

API

arrayToNdjson(input)

input

Type: Object[]

Array of objects that you want to convert to NDJSON format.

License

MIT © Simon

FAQs

Package last updated on 08 Aug 2017

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc