_baseIsArguments.js 486 B

123456789101112131415161718
  1. import baseGetTag from './_baseGetTag.js';
  2. import isObjectLike from './isObjectLike.js';
  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. export default baseIsArguments;