Index - Node documentation

Usage

import * as mod from "node:util/types";

Functions

f
isAnyArrayBuffer

Returns true if the value is a built-in ArrayBuffer or SharedArrayBuffer instance.

f
isArgumentsObject

Returns true if the value is an arguments object.

f
isArrayBuffer

Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances. Usually, it is desirable to test for both; See util.types.isAnyArrayBuffer() for that.

f
isArrayBufferView

Returns true if the value is an instance of one of the ArrayBuffer views, such as typed array objects or DataView. Equivalent to ArrayBuffer.isView().

f
isAsyncFunction

Returns true if the value is an async function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.

f
isBigInt64Array

Returns true if the value is a BigInt64Array instance.

f
isBigUint64Array

Returns true if the value is a BigUint64Array instance.

f
isBooleanObject

Returns true if the value is a boolean object, e.g. created by new Boolean().

f
isBoxedPrimitive

Returns true if the value is any boxed primitive object, e.g. created by new Boolean(), new String() or Object(Symbol()).

f
isCryptoKey

Returns true if value is a CryptoKey, false otherwise.

f
isDataView

Returns true if the value is a built-in DataView instance.

f
isDate

Returns true if the value is a built-in Date instance.

f
isExternal

Returns true if the value is a native External value.

f
isFloat32Array

Returns true if the value is a built-in Float32Array instance.

f
isFloat64Array

Returns true if the value is a built-in Float64Array instance.

f
isGeneratorFunction

Returns true if the value is a generator function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.

f
isGeneratorObject

Returns true if the value is a generator object as returned from a built-in generator function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.

f
isInt16Array

Returns true if the value is a built-in Int16Array instance.

f
isInt32Array

Returns true if the value is a built-in Int32Array instance.

f
isInt8Array

Returns true if the value is a built-in Int8Array instance.

f
isKeyObject

Returns true if value is a KeyObject, false otherwise.

f
isMap

Returns true if the value is a built-in Map instance.

f
isMapIterator

Returns true if the value is an iterator returned for a built-in Map instance.

f
isModuleNamespaceObject

Returns true if the value is an instance of a Module Namespace Object.

f
isNativeError

Returns true if the value was returned by the constructor of a built-in Error type.

f
isNumberObject

Returns true if the value is a number object, e.g. created by new Number().

f
isPromise

Returns true if the value is a built-in Promise.

f
isProxy

Returns true if the value is a Proxy instance.

f
isRegExp

Returns true if the value is a regular expression object.

f
isSet

Returns true if the value is a built-in Set instance.

f
isSetIterator

Returns true if the value is an iterator returned for a built-in Set instance.

f
isSharedArrayBuffer

Returns true if the value is a built-in SharedArrayBuffer instance. This does not include ArrayBuffer instances. Usually, it is desirable to test for both; See util.types.isAnyArrayBuffer() for that.

f
isStringObject

Returns true if the value is a string object, e.g. created by new String().

f
isSymbolObject

Returns true if the value is a symbol object, created by calling Object() on a Symbol primitive.

f
isTypedArray

Returns true if the value is a built-in TypedArray instance.

f
isUint16Array

Returns true if the value is a built-in Uint16Array instance.

f
isUint32Array

Returns true if the value is a built-in Uint32Array instance.

f
isUint8Array

Returns true if the value is a built-in Uint8Array instance.

f
isUint8ClampedArray

Returns true if the value is a built-in Uint8ClampedArray instance.

f
isWeakMap

Returns true if the value is a built-in WeakMap instance.

f
isWeakSet

Returns true if the value is a built-in WeakSet instance.