diff options
Diffstat (limited to 'deps/npm/node_modules/aproba/index.js')
-rw-r--r-- | deps/npm/node_modules/aproba/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/npm/node_modules/aproba/index.js b/deps/npm/node_modules/aproba/index.js index 6d1c17ece9..bb5ac3cda6 100644 --- a/deps/npm/node_modules/aproba/index.js +++ b/deps/npm/node_modules/aproba/index.js @@ -1,8 +1,12 @@ 'use strict' +function isArguments (thingy) { + return typeof thingy === 'object' && thingy.hasOwnProperty('callee') +} + var types = { '*': ['any', function () { return true }], - A: ['array', function (thingy) { return (Array.isArray && Array.isArray(thingy)) || (typeof thingy === 'object' && thingy.hasOwnProperty('callee')) }], + A: ['array', function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }], S: ['string', function (thingy) { return typeof thingy === 'string' }], N: ['number', function (thingy) { return typeof thingy === 'number' }], F: ['function', function (thingy) { return typeof thingy === 'function' }], |