diff-keys

1.0.0 • Public • Published

diff-keys v1.0.0 stable

npm install diff-keys
  • Traverse each object recursively, using hasOwnProperty on the second object.
  • Return an array of keys that exist in one object, but are missing from the other.

Usage

const diffKeys = require('diff-keys')
 
diffKeys({ a: 1, b: 1 }, { b: 1, c: 1 }) // => ['a', 'c']
 
diffKeys({ a: {b: 1} }, { a: {c: 1} }) // => ['a.b', 'a.c']

Readme

Keywords

none

Package Sidebar

Install

npm i diff-keys

Weekly Downloads

1

Version

1.0.0

License

none

Last publish

Collaborators

  • aleclarson