_baseIsArguments.js 488 B

12345678910111213141516171819
  1. var baseGetTag = require('./_baseGetTag'),
  2. isObjectLike = require('./isObjectLike');
  3. /** `Object#toString` result references. */
  4. var argsTag = '[object Arguments]';
  5. /**
  6. * The base implementation of `_.isArguments`.
  7. *
  8. * @private
  9. * @param {*} value The value to check.
  10. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  11. */
  12. function baseIsArguments(value) {
  13. return isObjectLike(value) && baseGetTag(value) == argsTag;
  14. }
  15. module.exports = baseIsArguments;