Skip to content

Function: isArguments()

ts
function isArguments(value): boolean;

Checks if a value is an arguments object. 检查值是否为arguments对象。

Parameters

ParameterTypeDescription
valueunknownThe value to check / 要检查的值

Returns

boolean

True if the value is an arguments object / 如果值是arguments对象则返回true

Example

ts
function testArgs() { return isArguments(arguments) }
testArgs() // => true
isArguments([]) // => false
isArguments({ length: 0 }) // => false

Since

1.0.0

Released under the MIT License.