Socket
Book a DemoInstallSign in
Socket

json-stream-combiner

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

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.

2.0.2
latest
npmnpm
Version published
Maintainers
1
Created
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

json

FAQs

Package last updated on 27 Apr 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.