Function: isArguments()
ts
function isArguments(value): boolean;Checks if a value is an arguments object. 检查值是否为arguments对象。
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | The 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 }) // => falseSince
1.0.0