generate-compare-function
generate compare function by object paths.
Note
I created this package.
I hope generate-compare-function
is faster than `select with shallow-equals
But real results is no my hopeness 😭
So we dont need this package
Sorry, my benchmark script had bug.
I solved this bug, so that made my hoped results.
this package is maybe useful someone!
$ npm run perf > generate-compare-function@0.0.0 perf /path/to/generate-compare-function> ts-node ./perf/perf.ts generate-compare-
Usage
generate compare function.
; ;
use compare function.
; ; ; // true, if passing same object.expectcomparebaseObject, baseObject.toBetrue; // false, if passing different objects thats are not have same value in path to compare.expectcomparebaseObject, differentObjectAsBase.toBefalse; // true, if passing different objects thats are have same value in path to compare.expectcomparebaseObject, sameObjectAsBase.toBetrue;