isArguments.js 400 B

12345678910111213141516
  1. import tagTester from './_tagTester.js';
  2. import has from './_has.js';
  3. var isArguments = tagTester('Arguments');
  4. // Define a fallback version of the method in browsers (ahem, IE < 9), where
  5. // there isn't any inspectable "Arguments" type.
  6. (function() {
  7. if (!isArguments(arguments)) {
  8. isArguments = function(obj) {
  9. return has(obj, 'callee');
  10. };
  11. }
  12. }());
  13. export default isArguments;