Fix:Include Watcher as lib with no dependencies and fix tiny-readdir bug #610

This commit is contained in:
advplyr 2022-05-28 20:01:20 -05:00
parent 160dac109d
commit ec6e70725c
34 changed files with 2187 additions and 281 deletions

View file

@ -0,0 +1,24 @@
"use strict";
/* IMPORT */
var isPrimitive = require("./is-primitive");
/* ARE SHALLOW EQUAL */
var isNaN = Number.isNaN;
function areShallowEqual(x, y) {
if (x === y)
return true;
if (isNaN(x))
return isNaN(y);
if (isPrimitive(x) || isPrimitive(y))
return x === y;
for (var i in x)
if (!(i in y))
return false;
for (var i in y)
if (x[i] !== y[i])
return false;
return true;
}
/* EXPORT */
module.exports = areShallowEqual;
module.exports.default = areShallowEqual;
Object.defineProperty(module.exports, "__esModule", { value: true });