|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
516 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * Checks if `value` is an integer.
|
|---|
| 3 | *
|
|---|
| 4 | * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.
|
|---|
| 5 | *
|
|---|
| 6 | * @param {any} value - The value to check
|
|---|
| 7 | * @returns {boolean} `true` if `value` is integer, otherwise `false`.
|
|---|
| 8 | *
|
|---|
| 9 | * @example
|
|---|
| 10 | * isInteger(3); // Returns: true
|
|---|
| 11 | * isInteger(Infinity); // Returns: false
|
|---|
| 12 | * isInteger('3'); // Returns: false
|
|---|
| 13 | * isInteger([]); // Returns: false
|
|---|
| 14 | */
|
|---|
| 15 | declare function isInteger(value?: any): boolean;
|
|---|
| 16 |
|
|---|
| 17 | export { isInteger };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.