Skip to content

isBigint ​

The isBigint function checks if the provided value is of type bigint.

Syntax ​

typescript
isBigint(value: any): value is bigint;

Parameters ​

ParameterTypeDescription
valueanyValue to be checked

Returns ​

TypeDescription
booleanTrue if it is a bigint

Examples ​

typescript
isBigint(10n); // => true
isBigint(10); // => false

Notes ​

  • Useful for validating large numeric values.

References ​

Released under the MIT License.