Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 461 Bytes

File metadata and controls

25 lines (16 loc) · 461 Bytes

diip

Tool to find deep differences between two input arguments

Returns an array of the addresses of each difference or null if they are deeply equal.

Install

$ npm install --save diip

Usage

const diip = require('diip');

diip(0, 0); // null

diip([{a: 0}, {b: [0, 1, 2]}],
     [{a: 0}, {b: [0, 1, 2]}]); // null

diip([{a: 0}, {b: [null, 1, 2]}],
     [{a: true}, {b: [0, 1, 2]}]); // [['0', 'a'], ['1', 'b', '0']]