Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Skokan <panva.ip@gmail.com>2021-05-10 13:33:11 +0300
committerFilip Skokan <panva.ip@gmail.com>2021-05-17 11:29:18 +0300
commit3ee1f9a29a6b18da79ac96c7e5e80f2933dfe2fb (patch)
tree71083800dae51ca21684b06bc3ecfffaa04356df /doc/api/util.md
parent2130598e91562efbfd594ba14f5f3eda2b2432d6 (diff)
util: add util.types.isKeyObject and util.types.isCryptoKey
closes #38611 PR-URL: https://github.com/nodejs/node/pull/38619 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'doc/api/util.md')
-rw-r--r--doc/api/util.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/api/util.md b/doc/api/util.md
index 429005799bd..35b93ba198f 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -1485,6 +1485,16 @@ util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true
util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true
```
+### `util.types.isCryptoKey(value)`
+<!-- YAML
+added: REPLACEME
+-->
+
+* `value` {Object}
+* Returns: {boolean}
+
+Returns `true` if `value` is a {CryptoKey}, `false` otherwise.
+
### `util.types.isDataView(value)`
<!-- YAML
added: v10.0.0
@@ -1680,6 +1690,16 @@ util.types.isInt32Array(new Int32Array()); // Returns true
util.types.isInt32Array(new Float64Array()); // Returns false
```
+### `util.types.isKeyObject(value)`
+<!-- YAML
+added: REPLACEME
+-->
+
+* `value` {Object}
+* Returns: {boolean}
+
+Returns `true` if `value` is a {KeyObject}, `false` otherwise.
+
### `util.types.isMap(value)`
<!-- YAML
added: v10.0.0