added unit testing, and started implementing unit tests...phew

This commit is contained in:
Josh Burman
2019-03-12 22:28:02 -04:00
parent 74aad4a957
commit e8c2539f1b
3489 changed files with 464813 additions and 88 deletions

24
node_modules/@sinonjs/samsam/lib/is-object.js generated vendored Normal file
View File

@ -0,0 +1,24 @@
"use strict";
// Returns true when the value is a regular Object and not a specialized Object
//
// This helps speeding up deepEqual cyclic checks
// The premise is that only Objects are stored in the visited array.
// So if this function returns false, we don't have to do the
// expensive operation of searching for the value in the the array of already
// visited objects
function isObject(value) {
return (
typeof value === "object" &&
value !== null &&
// none of these are collection objects, so we can return false
!(value instanceof Boolean) &&
!(value instanceof Date) &&
!(value instanceof Error) &&
!(value instanceof Number) &&
!(value instanceof RegExp) &&
!(value instanceof String)
);
}
module.exports = isObject;