time-to-botec/squiggle/node_modules/@stdlib/assert/is-arguments/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

1.6 KiB

isArguments

Test if a value is an arguments object.

Usage

var isArguments = require( '@stdlib/assert/is-arguments' );

isArguments( value )

Tests if a value is an arguments object.

function foo() {
    return arguments;
}

var bool = isArguments( foo() );
// returns true

bool = isArguments( [] );
// returns false

Examples

var isArguments = require( '@stdlib/assert/is-arguments' );

function foo() {
    return arguments;
}

var bool = isArguments( foo() );
// returns true

bool = isArguments( [] );
// returns false

bool = isArguments( {} );
// returns false

bool = isArguments( null );
// returns false

bool = isArguments( 'Arguments' );
// returns false

function Arguments() {
    return this;
}
bool = isArguments( new Arguments() );
// returns false