From 20302851a90f2964e1ec656050b00a565224fd56 Mon Sep 17 00:00:00 2001 From: leviscar <823727280@qq.com> Date: Tue, 22 Oct 2024 13:00:25 +0800 Subject: [PATCH] doc: add `isBigIntObject` to documentation Refs: https://github.com/nodejs/node/pull/19989 Fixes: https://github.com/nodejs/node/issues/55446 PR-URL: https://github.com/nodejs/node/pull/55450 Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli Reviewed-By: Antoine du Hamel --- doc/api/util.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/api/util.md b/doc/api/util.md index 333de5ed91ab56..7cc6ab13a4e668 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -2375,6 +2375,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)`