shallow-equal-jit
Version:
Fast shallow equal with Just-In-Time compiled compare functions.
3 lines (2 loc) • 472 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.shallowEqualJIT=function(e,t){void 0===t&&(t=!1);var n=function(e,n){return t?e+" === "+n:"Object.is("+e+", "+n+")"};return new Function("prev","next","return "+(e.length>0?n("prev","next")+" || ("+e.map((function(e){return e="number"==typeof e?e:JSON.stringify(e),n("prev["+e+"]","next["+e+"]")})).join(" && ")+")":"true")+";")};
//# sourceMappingURL=shallow-equal-jit.cjs.production.min.js.map