Files
lodash/isArguments.js
2017-01-10 14:43:43 -08:00

25 lines
592 B
JavaScript

import baseGetTag from './.internal/baseGetTag.js';
import isObjectLike from './isObjectLike.js';
/**
* Checks if `value` is likely an `arguments` object.
*
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* isArguments(function() { return arguments; }());
* // => true
*
* isArguments([1, 2, 3]);
* // => false
*/
function isArguments(value) {
return isObjectLike(value) && baseGetTag(value) == '[object Arguments]';
}
export default isArguments;