value-equal.min.js
610 Bytes
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.valueEqual=t()}(this,function(){"use strict";function f(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}return function n(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if(Array.isArray(t))return Array.isArray(r)&&t.length===r.length&&t.every(function(e,t){return n(e,r[t])});if("object"!=typeof t&&"object"!=typeof r)return!1;var e=f(t),u=f(r);return e!==t||u!==r?n(e,u):Object.keys(Object.assign({},t,r)).every(function(e){return n(t[e],r[e])})}});