jsonmerge

merge json file

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
jsonmerge
302.0.02 years ago8 years agoMinified + gzip package size for jsonmerge in KB

Readme

jsonmerge v dm cov unit e2e

Install

# with cli
$ npm install -g jsonmerge

# dependency in your project
$ npm install --save jsonmerge

Usage

API

const jsonmerge = require('jsonmerge')
let result = jsonmerge(['./test/fixtures/json/*.json'])

// or with jsonc support
const jsonmerge = require('jsonmerge/jsonc')
let result = jsonmerge(['./test/fixtures/jsonc/*.json'])

console.log(JSON.stringify(result, null, 4))

CLI

$ cd test/fixtures
$ jsonmerge json/*.json > result.json

# or with jsonc support
$ jsonmerge --jsonc jsonc/*.json > result.json

Compatibility

| os | Windows | Ubuntu | MacOS | |:---:|:---:|:---:|:---:| | supported | ✅ | ✅ | ✅ |
| node | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | |:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| | json | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | jsonc | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
See also: .github/workflows/

License

Apache v2.0 © Jayin Ton