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

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

@ -0,0 +1,35 @@
"use strict";
var getClass = require("./get-class");
/**
* @name samsam.isArguments
* @param Object object
*
* Returns ``true`` if ``object`` is an ``arguments`` object,
* ``false`` otherwise.
*/
function isArguments(object) {
if (getClass(object) === "Arguments") {
return true;
}
if (
typeof object !== "object" ||
typeof object.length !== "number" ||
getClass(object) === "Array"
) {
return false;
}
if (typeof object.callee === "function") {
return true;
}
try {
object[object.length] = 6;
delete object[object.length];
} catch (e) {
return true;
}
return false;
}
module.exports = isArguments;