isArguments.js 401 B

123456789101112131415
  1. var isKind = require('./isKind');
  2. /**
  3. */
  4. var isArgs = isKind(arguments, 'Arguments')?
  5. function(val){
  6. return isKind(val, 'Arguments');
  7. } :
  8. function(val){
  9. // Arguments is an Object on IE7
  10. return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee'));
  11. };
  12. module.exports = isArgs;