Socket
Socket
Sign inDemoInstall

json-stream-combiner

Package Overview
Dependencies
13
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    json-stream-combiner

Easey way to take json objects or files and write them to a destination file.


Version published
Weekly downloads
218
increased by21700%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Json Stream Combiner

A simple API to stream combine many json files, json objects, or array of json objects into a single output file.

npm install json-stream-combiner

If we have this input file:

[
	{ "x": 1, "y": 2 },
	{ "q": 1, "w": 2 }
]

We can pass that in like this:

import jsonStreamCombiner from 'jsonStreamCombiner';

jsonStreamCombiner([
	'/absolute/path/to/json/input.json',
	{ a: 1, b: 2 },
	[ { c: 1, d: 2 }, { e: 1, d: 2 } ]
], 
'/absolute/path/to/json/output.json').then(function() {
	console.log('Done!');
})

and then output.json will have this output:

[
	{ "x": 1, "y": 2 },
	{ "q": 1, "w": 2 },
	{ "a": 1, "b": 2 },
	{ "c": 1, "d": 2 }, 
	{ "e": 1, "d": 2 }
]

Keywords

FAQs

Last updated on 27 Apr 2024

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