From 4e89e622a20e28982f2baf807f701b8851611c82 Mon Sep 17 00:00:00 2001 From: liujunpeng Date: Sat, 19 Oct 2024 04:29:30 +0800 Subject: [PATCH] doc: add isBigIntObject to documentation Refs: https://github.com/nodejs/node/issues/55446 --- doc/api/util.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/api/util.md b/doc/api/util.md index 8623ab88c9ecfd..e1030673d303f6 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -2359,6 +2359,24 @@ util.types.isBigInt64Array(new BigInt64Array()); // Returns true util.types.isBigInt64Array(new BigUint64Array()); // Returns false ``` +### `util.types.isBigIntObject(value)` + + + +* `value` {any} +* Returns: {boolean} + +Returns `true` if the value is a BigInt object, e.g. created +by `Object(BigInt(123))`. + +```js +util.types.isBigIntObject(Object(BigInt(123))); // Returns true +util.types.isBigIntObject(BigInt(123)); // Returns false +util.types.isBigIntObject(123); // Returns false +``` + ### `util.types.isBigUint64Array(value)`