source: node_modules/es-toolkit/dist/compat/predicate/isArguments.d.mts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 920 bytes
Line 
1/**
2 * Checks if the given value is an arguments object.
3 *
4 * This function tests whether the provided value is an arguments object or not.
5 * It returns `true` if the value is an arguments object, and `false` otherwise.
6 *
7 * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.
8 *
9 * @param {any} value - The value to test if it is an arguments object.
10 * @returns {value is IArguments} `true` if the value is an arguments, `false` otherwise.
11 *
12 * @example
13 * const args = (function() { return arguments; })();
14 * const strictArgs = (function() { 'use strict'; return arguments; })();
15 * const value = [1, 2, 3];
16 *
17 * console.log(isArguments(args)); // true
18 * console.log(isArguments(strictArgs)); // true
19 * console.log(isArguments(value)); // false
20 */
21declare function isArguments(value?: any): value is IArguments;
22
23export { isArguments };
Note: See TracBrowser for help on using the repository browser.