wequaler
v0.5.330
Published
Collection of cross-platform routines to compare two complex structures. The module can answer questions: are two structures equivalent? are them identical? what is the difference between each other? Use the module avoid manually work and cherry picking.
Downloads
3,923
Readme
module::Equaler
Collection of cross-platform routines to compare two complex structures. The module can answer questions: are two structures equivalent? are them identical? what is the difference between each other? Use the module avoid manually work and cherry picking.
Sample
let _ = require( 'wequaler' );
var map1 = { a : 0, e : { c : 2, d : 3 } };
var map2 = { a : 0, e : { c : 2, d : 3 } };
var map3 = { a : 0, e : { d : 4 } };
console.log( 'map1 ~ map2 :', _.identical( map1, map2 ) );
console.log( 'map1 ~ map3 :', _.identical( map1, map3 ) );
/*
map1 ~ map2 : true
map1 ~ map3 : false
*/
Try out from the repository
git clone https://github.com/Wandalen/wEqualer
cd wEqualer
will .npm.install
node sample/trivial/Sample.s
Make sure you have utility willbe
installed. To install willbe: npm i -g willbe@stable
. Willbe is required to build of the module.
To add to your project
npm add 'wequaler@stable'
Willbe
is not required to use the module in your project as submodule.