Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sebastianroming/json-multilevel-delta
displays the diff between two json objects
https://github.com/sebastianroming/json-multilevel-delta
Last synced: 15 days ago
JSON representation
displays the diff between two json objects
- Host: GitHub
- URL: https://github.com/sebastianroming/json-multilevel-delta
- Owner: sebastianroming
- License: mit
- Created: 2018-08-21T08:32:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-16T04:29:07.000Z (over 5 years ago)
- Last Synced: 2024-10-05T17:43:30.961Z (3 months ago)
- Language: JavaScript
- Homepage: https://npmjs.com/package/json-multilevel-delta
- Size: 59.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-multilevel-delta [![Build Status](https://travis-ci.org/sebastianroming/json-multilevel-delta.svg?branch=master)](https://travis-ci.org/sebastianroming/json-multilevel-delta)
> Compare two objects and return the difference
## Install
```
npm install --save json-multilevel-delta
```## Usage
```js
const jsonMultilevelDelta = require('json-multilevel-delta');const objectA = { 'a': 'b', 'foo': { 'bar': 'baz', 'lorem': 'ipsum' } };
const objectB = { 'foo': { 'bar': 'baz' }, 'c': 'd' };jsonMultilevelDelta(objectA, objectB);
// => [ 'a', 'foo.lorem', 'c' ]jsonMultilevelDelta.json(objectA, objectB);
// => { 'a': 'b', 'foo': { 'lorem': 'ipsum' }, 'c': 'd' }
```## License
MIT © [Sebastian Roming](https://webmonkey.io)