Files
lodash/isArguments.js
John-David Dalton f03b3edca4 Update object checks.
2017-04-23 22:15:51 -07:00

23 lines
547 B
JavaScript

import getTag from './.internal/getTag.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 typeof value == 'object' && value !== null && getTag(value) == '[object Arguments]'
}
export default isArguments