UNPKG

proxyquire-2

Version:

Proxies import/require in order to allow overriding dependencies during testing.

14 lines (10 loc) 307 B
var is = {}; ['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'].forEach(function (name) { is[name] = function (obj) { return Object.prototype.toString.call(obj) == '[object ' + name + ']'; }; }); is.Object = function (obj) { return obj === new Object(obj); }; module.exports = is;