Node APIs reference
Node APIs
Every Node.js built-in module supported by Deno and its exports. Use your browser's find-in-page to locate a symbol, then click through for full documentation.
node:assert
-
assert.AssertionError
Indicates the failure of an assertion. All errors thrown by the
node:assertmodule will be instances of theAssertionErrorclass. -
assert.CallTracker
This feature is deprecated and will be removed in a future version. Please consider using alternatives such as the
mockhelper function. -
assert
An alias of ok.
-
assert.deepEqual
Strict assertion mode
-
assert.deepStrictEqual
Tests for deep equality between the
actualandexpectedparameters. "Deep" equality means that the enumerable "own" properties of child objects are recursively evaluated also by the following rules. -
assert.doesNotMatch
Expects the
stringinput not to match the regular expression. -
assert.doesNotReject
Awaits the
asyncFnpromise or, ifasyncFnis a function, immediately calls the function and awaits the returned promise to complete. It will then check that the promise is not rejected. -
assert.doesNotThrow
Asserts that the function
fndoes not throw an error. -
assert.equal
Strict assertion mode
-
assert.fail
Throws an
AssertionErrorwith the provided error message or a default error message. If themessageparameter is an instance of anErrorthen it will be thrown instead of theAssertionError. -
assert.ifError
Throws
valueifvalueis notundefinedornull. This is useful when testing theerrorargument in callbacks. The stack trace contains all frames from the error passed toifError()including the potential new frames forifError()itself. -
assert.match
Expects the
stringinput to match the regular expression. -
assert.notDeepEqual
Strict assertion mode
-
assert.notDeepStrictEqual
Tests for deep strict inequality. Opposite of deepStrictEqual.
-
assert.notEqual
Strict assertion mode
-
assert.notStrictEqual
Tests strict inequality between the
actualandexpectedparameters as determined byObject.is(). -
assert.ok
Tests if
valueis truthy. It is equivalent toassert.equal(!!value, true, message). -
assert.partialDeepStrictEqual
assert.partialDeepStrictEqual()Asserts the equivalence between theactualandexpectedparameters through a deep comparison, ensuring that all properties in theexpectedparameter are present in theactualparameter with equivalent values, not allowing type coercion. The main difference withassert.deepStrictEqual()is thatassert.partialDeepStrictEqual()does not require all properties in theactualparameter to be present in theexpectedparameter. This method should always pass the same test cases asassert.deepStrictEqual(), behaving as a super set of it. -
assert.rejects
Awaits the
asyncFnpromise or, ifasyncFnis a function, immediately calls the function and awaits the returned promise to complete. It will then check that the promise is rejected. -
assert.strictEqual
Tests strict equality between the
actualandexpectedparameters as determined byObject.is(). -
assert.throws
Expects the function
fnto throw an error. - assert.CallTrackerCall
- assert.CallTrackerReportInformation
-
assert.strict
In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example, deepEqual will behave like deepStrictEqual.
- assert.AssertPredicate
- assert.strict.AssertionError
- assert.strict.AssertPredicate
- assert.strict.CallTrackerCall
- assert.strict.CallTrackerReportInformation
node:async_hooks
-
AsyncLocalStorage
This class creates stores that stay coherent through asynchronous operations.
- AsyncResource
- createHook
- executionAsyncId
-
executionAsyncResource
Resource objects returned by
executionAsyncResource()are most often internal Node.js handle objects with undocumented APIs. Using any functions or properties on the object is likely to crash your application and should be avoided. -
triggerAsyncId
Promise contexts may not get valid
triggerAsyncIds by default. See the section on promise execution tracking. - AsyncHook
- AsyncResourceOptions
- HookCallbacks
node:buffer
-
Blob
A
Blobencapsulates immutable, raw data that can be safely shared across multiple worker threads. -
File
A
Fileprovides information about files. -
atob
Decodes a string of Base64-encoded data into bytes, and encodes those bytes into a string using Latin-1 (ISO-8859-1).
-
btoa
Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes into a string using Base64.
-
isAscii
This function returns
trueifinputcontains only valid ASCII-encoded data, including the case in whichinputis empty. -
isUtf8
This function returns
trueifinputcontains only valid UTF-8-encoded data, including the case in whichinputis empty. -
resolveObjectURL
Resolves a
'blob:nodedata:...'an associatedBlobobject registered using a prior call toURL.createObjectURL(). -
transcode
Re-encodes the given
BufferorUint8Arrayinstance from one character encoding to another. Returns a newBufferinstance. - BlobOptions
- Buffer
- BufferConstructor
- FileOptions
- BufferEncoding
-
ImplicitArrayBuffer
Bufferobjects are used to represent a fixed-length sequence of bytes. Many Node.js APIs supportBuffers. - TranscodeEncoding
- WithImplicitCoercion
- constants
- INSPECT_MAX_BYTES
- kMaxLength
- kStringMaxLength
- SlowBuffer
node:child_process
-
ChildProcess
Instances of the
ChildProcessrepresent spawned child processes. -
exec
Spawns a shell then executes the
commandwithin that shell, buffering any generated output. Thecommandstring passed to the exec function is processed directly by the shell and special characters (vary based on shell) need to be dealt with accordingly: - execFile
-
execFileSync
The
child_process.execFileSync()method is generally identical to execFile with the exception that the method will not return until the child process has fully closed. When a timeout has been encountered andkillSignalis sent, the method won't return until the process has completely exited. -
execSync
The
child_process.execSync()method is generally identical to exec with the exception that the method will not return until the child process has fully closed. When a timeout has been encountered andkillSignalis sent, the method won't return until the process has completely exited. If the child process intercepts and handles theSIGTERMsignal and doesn't exit, the parent process will wait until the child process has exited. -
fork
The
child_process.fork()method is a special case of spawn used specifically to spawn new Node.js processes. Like spawn, aChildProcessobject is returned. The returnedChildProcesswill have an additional communication channel built-in that allows messages to be passed back and forth between the parent and child. Seesubprocess.send()for details. -
spawn
The
child_process.spawn()method spawns a new process using the givencommand, with command-line arguments inargs. If omitted,argsdefaults to an empty array. -
spawnSync
The
child_process.spawnSync()method is generally identical to spawn with the exception that the function will not return until the child process has fully closed. When a timeout has been encountered andkillSignalis sent, the method won't return until the process has completely exited. If the process intercepts and handles theSIGTERMsignal and doesn't exit, the parent process will wait until the child process has exited. - ChildProcessByStdio
- ChildProcessWithoutNullStreams
- CommonExecOptions
- CommonOptions
- CommonSpawnOptions
- ExecException
- ExecFileOptions
- ExecFileOptionsWithBufferEncoding
- ExecFileOptionsWithOtherEncoding
- ExecFileOptionsWithStringEncoding
- ExecFileSyncOptions
- ExecFileSyncOptionsWithBufferEncoding
- ExecFileSyncOptionsWithStringEncoding
- ExecOptions
- ExecOptionsWithBufferEncoding
- ExecOptionsWithStringEncoding
- ExecSyncOptions
- ExecSyncOptionsWithBufferEncoding
- ExecSyncOptionsWithStringEncoding
- ForkOptions
- MessageOptions
- MessagingOptions
- ProcessEnvOptions
- PromiseWithChild
- SpawnOptions
- SpawnOptionsWithoutStdio
- SpawnOptionsWithStdioTuple
- SpawnSyncOptions
- SpawnSyncOptionsWithBufferEncoding
- SpawnSyncOptionsWithStringEncoding
- SpawnSyncReturns
- ExecFileException
- IOType
- SendHandle
- Serializable
- SerializationType
- StdioNull
- StdioOptions
- StdioPipe
- StdioPipeNamed
node:cluster
node:console
- Console
- console.ConsoleConstructor
- console.ConsoleConstructorOptions
-
console
The
consolemodule provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers.
node:constants
node:crypto
- Certificate
-
Cipher
Instances of the
Cipherclass are used to encrypt data. The class can be used in one of two ways: -
Decipher
Instances of the
Decipherclass are used to decrypt data. The class can be used in one of two ways: -
DiffieHellman
The
DiffieHellmanclass is a utility for creating Diffie-Hellman key exchanges. - ECDH
-
Hash
The
Hashclass is a utility for creating hash digests of data. It can be used in one of two ways: - KeyObject
- Sign
-
Verify
The
Verifyclass is a utility for verifying signatures. It can be used in one of two ways: -
X509Certificate
Encapsulates an X509 certificate and provides read-only access to its information.
-
Hmac
The
Hmacclass is a utility for creating cryptographic HMAC digests. It can be used in one of two ways: -
checkPrime
Checks the primality of the
candidate. -
checkPrimeSync
Checks the primality of the
candidate. -
createCipheriv
Creates and returns a
Cipherobject, with the givenalgorithm,keyand initialization vector (iv). -
createDecipheriv
Creates and returns a
Decipherobject that uses the givenalgorithm,keyand initialization vector (iv). -
createDiffieHellman
Creates a
DiffieHellmankey exchange object using the suppliedprimeand an optional specificgenerator. -
createDiffieHellmanGroup
An alias for getDiffieHellman
-
createECDH
Creates an Elliptic Curve Diffie-Hellman (
ECDH) key exchange object using a predefined curve specified by thecurveNamestring. Use getCurves to obtain a list of available curve names. On recent OpenSSL releases,openssl ecparam -list_curveswill also display the name and description of each available elliptic curve. -
createHash
Creates and returns a
Hashobject that can be used to generate hash digests using the givenalgorithm. Optionaloptionsargument controls stream behavior. For XOF hash functions such as'shake256', theoutputLengthoption can be used to specify the desired output length in bytes. -
createHmac
Creates and returns an
Hmacobject that uses the givenalgorithmandkey. Optionaloptionsargument controls stream behavior. -
createPrivateKey
Creates and returns a new key object containing a private key. If
keyis a string orBuffer,formatis assumed to be'pem'; otherwise,keymust be an object with the properties described above. -
createPublicKey
Creates and returns a new key object containing a public key. If
keyis a string orBuffer,formatis assumed to be'pem'; ifkeyis aKeyObjectwith type'private', the public key is derived from the given private key; otherwise,keymust be an object with the properties described above. -
createSecretKey
Creates and returns a new key object containing a secret key for symmetric encryption or
Hmac. -
createSign
Creates and returns a
Signobject that uses the givenalgorithm. Use getHashes to obtain the names of the available digest algorithms. Optionaloptionsargument controls thestream.Writablebehavior. -
createVerify
Creates and returns a
Verifyobject that uses the given algorithm. Use getHashes to obtain an array of names of the available signing algorithms. Optionaloptionsargument controls thestream.Writablebehavior. -
diffieHellman
Computes the Diffie-Hellman secret based on a
privateKeyand apublicKey. Both keys must have the sameasymmetricKeyType, which must be one of'dh'(for Diffie-Hellman),'ec'(for ECDH),'x448', or'x25519'(for ECDH-ES). -
generateKey
Asynchronously generates a new random secret key of the given
length. Thetypewill determine which validations will be performed on thelength. - generateKeyPair
-
generateKeyPairSync
Generates a new asymmetric key pair of the given
type. RSA, RSA-PSS, DSA, EC, Ed25519, Ed448, X25519, X448, and DH are currently supported. -
generateKeySync
Synchronously generates a new random secret key of the given
length. Thetypewill determine which validations will be performed on thelength. - generatePrime
-
generatePrimeSync
Generates a pseudorandom prime of
sizebits. -
getCipherInfo
Returns information about a given cipher.
- getCiphers
- getCurves
-
getDiffieHellman
Creates a predefined
DiffieHellmanGroupkey exchange object. The supported groups are listed in the documentation forDiffieHellmanGroup. - getFips
- getHashes
-
getRandomValues
A convenient alias for webcrypto.getRandomValues. This implementation is not compliant with the Web Crypto spec, to write web-compatible code use webcrypto.getRandomValues instead.
-
hash
A utility for creating one-shot hash digests of data. It can be faster than the object-based
crypto.createHash()when hashing a smaller amount of data (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to usecrypto.createHash()instead. Thealgorithmis dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are'sha256','sha512', etc. On recent releases of OpenSSL,openssl list -digest-algorithmswill display the available digest algorithms. -
hkdf
HKDF is a simple key derivation function defined in RFC 5869. The given
ikm,saltandinfoare used with thedigestto derive a key ofkeylenbytes. -
hkdfSync
Provides a synchronous HKDF key derivation function as defined in RFC 5869. The given
ikm,saltandinfoare used with thedigestto derive a key ofkeylenbytes. -
pbkdf2
Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) implementation. A selected HMAC digest algorithm specified by
digestis applied to derive a key of the requested byte length (keylen) from thepassword,saltanditerations. -
pbkdf2Sync
Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) implementation. A selected HMAC digest algorithm specified by
digestis applied to derive a key of the requested byte length (keylen) from thepassword,saltanditerations. -
privateDecrypt
Decrypts
bufferwithprivateKey.bufferwas previously encrypted using the corresponding public key, for example using publicEncrypt. -
privateEncrypt
Encrypts
bufferwithprivateKey. The returned data can be decrypted using the corresponding public key, for example using publicDecrypt. - pseudoRandomBytes
- publicDecrypt
-
publicEncrypt
Encrypts the content of
bufferwithkeyand returns a newBufferwith encrypted content. The returned data can be decrypted using the corresponding private key, for example using privateDecrypt. -
randomBytes
Generates cryptographically strong pseudorandom data. The
sizeargument is a number indicating the number of bytes to generate. -
randomFill
This function is similar to randomBytes but requires the first argument to be a
Bufferthat will be filled. It also requires that a callback is passed in. -
randomFillSync
Synchronous version of randomFill.
-
randomInt
Return a random integer
nsuch thatmin <= n < max. This implementation avoids modulo bias. -
randomUUID
Generates a random RFC 4122 version 4 UUID. The UUID is generated using a cryptographic pseudorandom number generator.
-
scrypt
Provides an asynchronous scrypt implementation. Scrypt is a password-based key derivation function that is designed to be expensive computationally and memory-wise in order to make brute-force attacks unrewarding.
-
scryptSync
Provides a synchronous scrypt implementation. Scrypt is a password-based key derivation function that is designed to be expensive computationally and memory-wise in order to make brute-force attacks unrewarding.
- secureHeapUsed
- setEngine
-
setFips
Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available.
-
sign
Calculates and returns the signature for
datausing the given private key and algorithm. Ifalgorithmisnullorundefined, then the algorithm is dependent upon the key type (especially Ed25519 and Ed448). -
timingSafeEqual
This function compares the underlying bytes that represent the given
ArrayBuffer,TypedArray, orDataViewinstances using a constant-time algorithm. -
verify
Verifies the given signature for
datausing the given key and algorithm. Ifalgorithmisnullorundefined, then the algorithm is dependent upon the key type (especially Ed25519 and Ed448). - AsymmetricKeyDetails
- BasePrivateKeyEncodingOptions
- CheckPrimeOptions
- CipherCCM
- CipherCCMOptions
- CipherChaCha20Poly1305
- CipherChaCha20Poly1305Options
- CipherGCM
- CipherGCMOptions
- CipherInfo
- CipherInfoOptions
- CipherOCB
- CipherOCBOptions
- DecipherCCM
- DecipherChaCha20Poly1305
- DecipherGCM
- DecipherOCB
- DiffieHellmanGroupConstructor
- DSAKeyPairKeyObjectOptions
- DSAKeyPairOptions
- ECKeyPairKeyObjectOptions
- ECKeyPairOptions
- ED25519KeyPairKeyObjectOptions
- ED25519KeyPairOptions
- ED448KeyPairKeyObjectOptions
- ED448KeyPairOptions
- GeneratePrimeOptions
- GeneratePrimeOptionsArrayBuffer
- GeneratePrimeOptionsBigInt
- HashOptions
- JsonWebKey
- JsonWebKeyInput
- JwkKeyExportOptions
- KeyExportOptions
- KeyPairKeyObjectResult
- KeyPairSyncResult
- PrivateKeyInput
- PublicKeyInput
- RandomUUIDOptions
- RSAKeyPairKeyObjectOptions
- RSAKeyPairOptions
- RsaPrivateKey
- RSAPSSKeyPairKeyObjectOptions
- RSAPSSKeyPairOptions
- RsaPublicKey
- ScryptOptions
- SecureHeapUsage
- SigningOptions
- SignJsonWebKeyInput
- SignKeyObjectInput
- SignPrivateKeyInput
- VerifyJsonWebKeyInput
- VerifyKeyObjectInput
- VerifyPublicKeyInput
- webcrypto.AesCbcParams
- webcrypto.AesCtrParams
- webcrypto.AesDerivedKeyParams
- webcrypto.AesGcmParams
- webcrypto.AesKeyAlgorithm
- webcrypto.AesKeyGenParams
- webcrypto.Algorithm
-
webcrypto.Crypto
Importing the
webcryptoobject (import { webcrypto } from 'node:crypto') gives an instance of theCryptoclass.Cryptois a singleton that provides access to the remainder of the crypto API. - webcrypto.CryptoKey
- webcrypto.CryptoKeyConstructor
-
webcrypto.CryptoKeyPair
The
CryptoKeyPairis a simple dictionary object withpublicKeyandprivateKeyproperties, representing an asymmetric key pair. - webcrypto.EcdhKeyDeriveParams
- webcrypto.EcdsaParams
- webcrypto.EcKeyAlgorithm
- webcrypto.EcKeyGenParams
- webcrypto.EcKeyImportParams
- webcrypto.Ed448Params
- webcrypto.HkdfParams
- webcrypto.HmacImportParams
- webcrypto.HmacKeyAlgorithm
- webcrypto.HmacKeyGenParams
- webcrypto.JsonWebKey
- webcrypto.KeyAlgorithm
- webcrypto.Pbkdf2Params
- webcrypto.RsaHashedImportParams
- webcrypto.RsaHashedKeyAlgorithm
- webcrypto.RsaHashedKeyGenParams
- webcrypto.RsaKeyAlgorithm
- webcrypto.RsaKeyGenParams
- webcrypto.RsaOaepParams
- webcrypto.RsaOtherPrimesInfo
- webcrypto.RsaPssParams
- webcrypto.SubtleCrypto
- X25519KeyPairKeyObjectOptions
- X25519KeyPairOptions
- X448KeyPairKeyObjectOptions
- X448KeyPairOptions
- X509CheckOptions
- constants
- BinaryLike
- BinaryToTextEncoding
- CharacterEncoding
- CipherCCMTypes
- CipherChaCha20Poly1305Types
- CipherGCMTypes
- CipherKey
- CipherMode
- CipherOCBTypes
- DSAEncoding
- ECDHKeyFormat
- Encoding
- KeyFormat
- KeyLike
- KeyObjectType
- KeyType
- LargeNumberLike
- LegacyCharacterEncoding
- UUID
- webcrypto.AlgorithmIdentifier
- webcrypto.BigInteger
- webcrypto.BufferSource
- webcrypto.HashAlgorithmIdentifier
- webcrypto.KeyFormat
- webcrypto.KeyType
- webcrypto.KeyUsage
- webcrypto.NamedCurve
-
constants.defaultCipherList
Specifies the active default cipher list used by the current Node.js process (colon-separated values).
-
constants.defaultCoreCipherList
Specifies the built-in default cipher list used by Node.js (colon-separated values).
- constants.DH_CHECK_P_NOT_PRIME
- constants.DH_CHECK_P_NOT_SAFE_PRIME
- constants.DH_NOT_SUITABLE_GENERATOR
- constants.DH_UNABLE_TO_CHECK_GENERATOR
- constants.ENGINE_METHOD_ALL
- constants.ENGINE_METHOD_CIPHERS
- constants.ENGINE_METHOD_DH
- constants.ENGINE_METHOD_DIGESTS
- constants.ENGINE_METHOD_DSA
- constants.ENGINE_METHOD_EC
- constants.ENGINE_METHOD_NONE
- constants.ENGINE_METHOD_PKEY_ASN1_METHS
- constants.ENGINE_METHOD_PKEY_METHS
- constants.ENGINE_METHOD_RAND
- constants.ENGINE_METHOD_RSA
- constants.OPENSSL_VERSION_NUMBER
- constants.POINT_CONVERSION_COMPRESSED
- constants.POINT_CONVERSION_HYBRID
- constants.POINT_CONVERSION_UNCOMPRESSED
- constants.RSA_NO_PADDING
- constants.RSA_PKCS1_OAEP_PADDING
- constants.RSA_PKCS1_PADDING
- constants.RSA_PKCS1_PSS_PADDING
-
constants.RSA_PSS_SALTLEN_AUTO
Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature.
-
constants.RSA_PSS_SALTLEN_DIGEST
Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying.
-
constants.RSA_PSS_SALTLEN_MAX_SIGN
Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data.
- constants.RSA_SSLV23_PADDING
- constants.RSA_X931_PADDING
-
constants.SSL_OP_ALL
Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail.
-
constants.SSL_OP_ALLOW_NO_DHE_KEX
Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3
-
constants.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html.
-
constants.SSL_OP_CIPHER_SERVER_PREFERENCE
Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html.
-
constants.SSL_OP_CISCO_ANYCONNECT
Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER.
-
constants.SSL_OP_COOKIE_EXCHANGE
Instructs OpenSSL to turn on cookie exchange.
-
constants.SSL_OP_CRYPTOPRO_TLSEXT_BUG
Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft.
-
constants.SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d.
-
constants.SSL_OP_LEGACY_SERVER_CONNECT
Allows initial connection to servers that do not support RI.
-
constants.SSL_OP_NO_COMPRESSION
Instructs OpenSSL to disable support for SSL/TLS compression.
-
constants.SSL_OP_NO_ENCRYPT_THEN_MAC
Instructs OpenSSL to disable encrypt-then-MAC.
- constants.SSL_OP_NO_QUERY_MTU
-
constants.SSL_OP_NO_RENEGOTIATION
Instructs OpenSSL to disable renegotiation.
-
constants.SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
Instructs OpenSSL to always start a new session when performing renegotiation.
-
constants.SSL_OP_NO_SSLv2
Instructs OpenSSL to turn off SSL v2
-
constants.SSL_OP_NO_SSLv3
Instructs OpenSSL to turn off SSL v3
-
constants.SSL_OP_NO_TICKET
Instructs OpenSSL to disable use of RFC4507bis tickets.
-
constants.SSL_OP_NO_TLSv1
Instructs OpenSSL to turn off TLS v1
-
constants.SSL_OP_NO_TLSv1_1
Instructs OpenSSL to turn off TLS v1.1
-
constants.SSL_OP_NO_TLSv1_2
Instructs OpenSSL to turn off TLS v1.2
-
constants.SSL_OP_NO_TLSv1_3
Instructs OpenSSL to turn off TLS v1.3
-
constants.SSL_OP_PRIORITIZE_CHACHA
Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if
SSL_OP_CIPHER_SERVER_PREFERENCEis not enabled. -
constants.SSL_OP_TLS_ROLLBACK_BUG
Instructs OpenSSL to disable version rollback attack detection.
- crypto
- DiffieHellmanGroup
-
subtle
A convenient alias for
crypto.webcrypto.subtle. - webcrypto
- fips
node:dgram
- Socket
-
createSocket
Creates a
dgram.Socketobject. Once the socket is created, callingsocket.bind()will instruct the socket to begin listening for datagram messages. Whenaddressandportare not passed tosocket.bind()the method will bind the socket to the "all interfaces" address on a random port (it does the right thing for bothudp4andudp6sockets). The bound address and port can be retrieved usingsocket.address().addressandsocket.address().port. - BindOptions
- RemoteInfo
- SocketOptions
- SocketType
node:diagnostics_channel
-
Channel
The class
Channelrepresents an individual named channel within the data pipeline. It is used to track subscribers and to publish messages when there are subscribers present. It exists as a separate object to avoid channel lookups at publish time, enabling very fast publish speeds and allowing for heavy use while incurring very minimal cost. Channels are created with channel, constructing a channel directly withnew Channel(name)is not supported. -
TracingChannel
The class
TracingChannelis a collection ofTracingChannel Channelswhich together express a single traceable action. It is used to formalize and simplify the process of producing events for tracing application flow. tracingChannel is used to construct aTracingChannel. As withChannelit is recommended to create and reuse a singleTracingChannelat the top-level of the file rather than creating them dynamically. -
channel
This is the primary entry-point for anyone wanting to publish to a named channel. It produces a channel object which is optimized to reduce overhead at publish time as much as possible.
-
hasSubscribers
Check if there are active subscribers to the named channel. This is helpful if the message you want to send might be expensive to prepare.
-
subscribe
Register a message handler to subscribe to this channel. This message handler will be run synchronously whenever a message is published to the channel. Any errors thrown in the message handler will trigger an
'uncaughtException'. -
tracingChannel
Creates a
TracingChannelwrapper for the givenTracingChannel Channels. If a name is given, the corresponding tracing channels will be created in the form oftracing:${name}:${eventType}whereeventTypecorresponds to the types ofTracingChannel Channels. -
unsubscribe
Remove a message handler previously registered to this channel with subscribe.
- TracingChannelCollection
- TracingChannelSubscribers
- ChannelListener
node:dns
-
promises.Resolver
An independent resolver for DNS requests.
-
Resolver
An independent resolver for DNS requests.
-
getDefaultResultOrder
Get the default value for
orderin lookup anddnsPromises.lookup(). The value could be: -
getServers
Returns an array of IP address strings, formatted according to RFC 5952, that are currently configured for DNS resolution. A string will include a port section if a custom port is used.
-
lookup
Resolves a host name (e.g.
'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. Alloptionproperties are optional. Ifoptionsis an integer, then it must be4or6– ifoptionsis0or not provided, then IPv4 and IPv6 addresses are both returned if found. -
lookupService
Resolves the given
addressandportinto a host name and service using the operating system's underlyinggetnameinfoimplementation. -
promises.getDefaultResultOrder
Get the default value for
verbatimin lookup and dnsPromises.lookup(). The value could be: -
promises.getServers
Returns an array of IP address strings, formatted according to RFC 5952, that are currently configured for DNS resolution. A string will include a port section if a custom port is used.
-
promises.lookup
Resolves a host name (e.g.
'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. Alloptionproperties are optional. Ifoptionsis an integer, then it must be4or6– ifoptionsis not provided, then IPv4 and IPv6 addresses are both returned if found. -
promises.lookupService
Resolves the given
addressandportinto a host name and service using the operating system's underlyinggetnameinfoimplementation. -
promises.resolve
Uses the DNS protocol to resolve a host name (e.g.
'nodejs.org') into an array of the resource records. When successful, thePromiseis resolved with an array of resource records. The type and structure of individual results vary based onrrtype: -
promises.resolve4
Uses the DNS protocol to resolve IPv4 addresses (
Arecords) for thehostname. On success, thePromiseis resolved with an array of IPv4 addresses (e.g.['74.125.79.104', '74.125.79.105', '74.125.79.106']). -
promises.resolve6
Uses the DNS protocol to resolve IPv6 addresses (
AAAArecords) for thehostname. On success, thePromiseis resolved with an array of IPv6 addresses. -
promises.resolveAny
Uses the DNS protocol to resolve all records (also known as
ANYor*query). On success, thePromiseis resolved with an array containing various types of records. Each object has a propertytypethat indicates the type of the current record. And depending on thetype, additional properties will be present on the object: -
promises.resolveCaa
Uses the DNS protocol to resolve
CAArecords for thehostname. On success, thePromiseis resolved with an array of objects containing available certification authority authorization records available for thehostname(e.g.[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]). -
promises.resolveCname
Uses the DNS protocol to resolve
CNAMErecords for thehostname. On success, thePromiseis resolved with an array of canonical name records available for thehostname(e.g.['bar.example.com']). -
promises.resolveMx
Uses the DNS protocol to resolve mail exchange records (
MXrecords) for thehostname. On success, thePromiseis resolved with an array of objects containing both apriorityandexchangeproperty (e.g.[{priority: 10, exchange: 'mx.example.com'}, ...]). -
promises.resolveNaptr
Uses the DNS protocol to resolve regular expression-based records (
NAPTRrecords) for thehostname. On success, thePromiseis resolved with an array of objects with the following properties: -
promises.resolveNs
Uses the DNS protocol to resolve name server records (
NSrecords) for thehostname. On success, thePromiseis resolved with an array of name server records available forhostname(e.g.['ns1.example.com', 'ns2.example.com']). -
promises.resolvePtr
Uses the DNS protocol to resolve pointer records (
PTRrecords) for thehostname. On success, thePromiseis resolved with an array of strings containing the reply records. -
promises.resolveSoa
Uses the DNS protocol to resolve a start of authority record (
SOArecord) for thehostname. On success, thePromiseis resolved with an object with the following properties: -
promises.resolveSrv
Uses the DNS protocol to resolve service records (
SRVrecords) for thehostname. On success, thePromiseis resolved with an array of objects with the following properties: -
promises.resolveTxt
Uses the DNS protocol to resolve text queries (
TXTrecords) for thehostname. On success, thePromiseis resolved with a two-dimensional array of the text records available forhostname(e.g.[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]). Each sub-array contains TXT chunks of one record. Depending on the use case, these could be either joined together or treated separately. -
promises.reverse
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names.
-
promises.setDefaultResultOrder
Set the default value of
orderindns.lookup()and[lookup](/api/node/dns/. The value could be: -
promises.setServers
Sets the IP address and port of servers to be used when performing DNS resolution. The
serversargument is an array of RFC 5952 formatted addresses. If the port is the IANA default DNS port (53) it can be omitted. - resolve
- resolve4
- resolve6
- resolveAny
- resolveCaa
- resolveCname
- resolveMx
- resolveNaptr
- resolveNs
- resolvePtr
- resolveSoa
- resolveSrv
- resolveTxt
-
reverse
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names.
-
setDefaultResultOrder
Set the default value of
orderin lookup anddnsPromises.lookup(). The value could be: -
setServers
Sets the IP address and port of servers to be used when performing DNS resolution. The
serversargument is an array of RFC 5952 formatted addresses. If the port is the IANA default DNS port (53) it can be omitted. - AnyAaaaRecord
- AnyARecord
- AnyCnameRecord
- AnyMxRecord
- AnyNaptrRecord
- AnyNsRecord
- AnyPtrRecord
- AnySoaRecord
- AnySrvRecord
- AnyTxtRecord
- CaaRecord
- LookupAddress
- LookupAllOptions
- LookupOneOptions
- LookupOptions
- MxRecord
- NaptrRecord
- RecordWithTtl
- ResolveOptions
- ResolverOptions
- ResolveWithTtlOptions
- SoaRecord
- SrvRecord
-
promises
The
dns.promisesAPI provides an alternative set of asynchronous DNS methods that returnPromiseobjects rather than using callbacks. The API is accessible viaimport { promises as dnsPromises } from 'node:dns'orimport dnsPromises from 'node:dns/promises'. - AnyRecord
- AnyRecordWithTtl
-
ADDRCONFIG
Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are only returned if the current system has at least one IPv4 address configured.
- ADDRGETNETWORKPARAMS
-
ALL
If
dns.V4MAPPEDis specified, return resolved IPv6 addresses as well as IPv4 mapped IPv6 addresses. - BADFAMILY
- BADFLAGS
- BADHINTS
- BADNAME
- BADQUERY
- BADRESP
- BADSTR
- CANCELLED
- CONNREFUSED
- DESTRUCTION
- EOF
- FILE
- FORMERR
- LOADIPHLPAPI
- NODATA
- NOMEM
- NONAME
- NOTFOUND
- NOTIMP
- NOTINITIALIZED
- promises.ADDRGETNETWORKPARAMS
- promises.BADFAMILY
- promises.BADFLAGS
- promises.BADHINTS
- promises.BADNAME
- promises.BADQUERY
- promises.BADRESP
- promises.BADSTR
- promises.CANCELLED
- promises.CONNREFUSED
- promises.DESTRUCTION
- promises.EOF
- promises.FILE
- promises.FORMERR
- promises.LOADIPHLPAPI
- promises.NODATA
- promises.NOMEM
- promises.NONAME
- promises.NOTFOUND
- promises.NOTIMP
- promises.NOTINITIALIZED
- promises.REFUSED
- promises.SERVFAIL
- promises.TIMEOUT
- REFUSED
- SERVFAIL
- TIMEOUT
-
V4MAPPED
If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported on some operating systems (e.g. FreeBSD 10.1).
node:dns/promises
-
Resolver
An independent resolver for DNS requests.
-
getDefaultResultOrder
Get the default value for
verbatimin lookup and dnsPromises.lookup(). The value could be: -
getServers
Returns an array of IP address strings, formatted according to RFC 5952, that are currently configured for DNS resolution. A string will include a port section if a custom port is used.
-
lookup
Resolves a host name (e.g.
'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. Alloptionproperties are optional. Ifoptionsis an integer, then it must be4or6– ifoptionsis not provided, then IPv4 and IPv6 addresses are both returned if found. -
lookupService
Resolves the given
addressandportinto a host name and service using the operating system's underlyinggetnameinfoimplementation. -
resolve
Uses the DNS protocol to resolve a host name (e.g.
'nodejs.org') into an array of the resource records. When successful, thePromiseis resolved with an array of resource records. The type and structure of individual results vary based onrrtype: -
resolve4
Uses the DNS protocol to resolve IPv4 addresses (
Arecords) for thehostname. On success, thePromiseis resolved with an array of IPv4 addresses (e.g.['74.125.79.104', '74.125.79.105', '74.125.79.106']). -
resolve6
Uses the DNS protocol to resolve IPv6 addresses (
AAAArecords) for thehostname. On success, thePromiseis resolved with an array of IPv6 addresses. -
resolveAny
Uses the DNS protocol to resolve all records (also known as
ANYor*query). On success, thePromiseis resolved with an array containing various types of records. Each object has a propertytypethat indicates the type of the current record. And depending on thetype, additional properties will be present on the object: -
resolveCaa
Uses the DNS protocol to resolve
CAArecords for thehostname. On success, thePromiseis resolved with an array of objects containing available certification authority authorization records available for thehostname(e.g.[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]). -
resolveCname
Uses the DNS protocol to resolve
CNAMErecords for thehostname. On success, thePromiseis resolved with an array of canonical name records available for thehostname(e.g.['bar.example.com']). -
resolveMx
Uses the DNS protocol to resolve mail exchange records (
MXrecords) for thehostname. On success, thePromiseis resolved with an array of objects containing both apriorityandexchangeproperty (e.g.[{priority: 10, exchange: 'mx.example.com'}, ...]). -
resolveNaptr
Uses the DNS protocol to resolve regular expression-based records (
NAPTRrecords) for thehostname. On success, thePromiseis resolved with an array of objects with the following properties: -
resolveNs
Uses the DNS protocol to resolve name server records (
NSrecords) for thehostname. On success, thePromiseis resolved with an array of name server records available forhostname(e.g.['ns1.example.com', 'ns2.example.com']). -
resolvePtr
Uses the DNS protocol to resolve pointer records (
PTRrecords) for thehostname. On success, thePromiseis resolved with an array of strings containing the reply records. -
resolveSoa
Uses the DNS protocol to resolve a start of authority record (
SOArecord) for thehostname. On success, thePromiseis resolved with an object with the following properties: -
resolveSrv
Uses the DNS protocol to resolve service records (
SRVrecords) for thehostname. On success, thePromiseis resolved with an array of objects with the following properties: -
resolveTxt
Uses the DNS protocol to resolve text queries (
TXTrecords) for thehostname. On success, thePromiseis resolved with a two-dimensional array of the text records available forhostname(e.g.[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]). Each sub-array contains TXT chunks of one record. Depending on the use case, these could be either joined together or treated separately. -
reverse
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names.
-
setDefaultResultOrder
Set the default value of
orderindns.lookup()and[lookup](/api/node/dns/promises/. The value could be: -
setServers
Sets the IP address and port of servers to be used when performing DNS resolution. The
serversargument is an array of RFC 5952 formatted addresses. If the port is the IANA default DNS port (53) it can be omitted. - ADDRGETNETWORKPARAMS
- BADFAMILY
- BADFLAGS
- BADHINTS
- BADNAME
- BADQUERY
- BADRESP
- BADSTR
- CANCELLED
- CONNREFUSED
- DESTRUCTION
- EOF
- FILE
- FORMERR
- LOADIPHLPAPI
- NODATA
- NOMEM
- NONAME
- NOTFOUND
- NOTIMP
- NOTINITIALIZED
- REFUSED
- SERVFAIL
- TIMEOUT
node:domain
node:events
-
EventEmitter.EventEmitterAsyncResource
Integrates
EventEmitterwithAsyncResourceforEventEmitters that require manual async tracking. Specifically, all events emitted by instances ofevents.EventEmitterAsyncResourcewill run within itsasync context. -
EventEmitter
The
EventEmitterclass is defined and exposed by thenode:eventsmodule: - EventEmitter.Abortable
- EventEmitter.EventEmitterAsyncResourceOptions
- EventEmitter.EventEmitterReferencingAsyncResource
- EventEmitterOptions
- StaticEventEmitterIteratorOptions
- StaticEventEmitterOptions
- AnyRest
- Args
- DefaultEventMap
- EventMap
- Key
- Key2
- Listener
- Listener1
- Listener2
node:fs
-
Dir
A class representing a directory stream.
-
Dirent
A representation of a directory entry, which can be a file or a subdirectory within the directory, as returned by reading from an
fs.Dir. The directory entry is a combination of the file name and file type pairs. -
ReadStream
Instances of
fs.ReadStreamare created and returned using the createReadStream function. - WriteStream
- Extends
stream.Writable
Tests a user's permissions for the file or directory specified by path. The mode argument is an optional integer that specifies the accessibility checks to be performed. mode should be either the value fs.constants.F_OK or a mask consisting of the bitwise OR of any of fs.constants.R_OK, fs.constants.W_OK, and fs.constants.X_OK (e.g.fs.constants.W_OK | fs.constants.R_OK). Check File access constants for possible values of mode.
Synchronously tests a user's permissions for the file or directory specified by path. The mode argument is an optional integer that specifies the accessibility checks to be performed. mode should be either the value fs.constants.F_OK or a mask consisting of the bitwise OR of any of fs.constants.R_OK, fs.constants.W_OK, and fs.constants.X_OK (e.g.fs.constants.W_OK | fs.constants.R_OK). Check File access constants for possible values of mode.
Asynchronously append data to a file, creating the file if it does not yet exist. data can be a string or a Buffer.
Synchronously append data to a file, creating the file if it does not yet exist. data can be a string or a Buffer.
Asynchronously changes the permissions of a file. No arguments other than a possible exception are given to the completion callback.
For detailed information, see the documentation of the asynchronous version of this API: chmod.
Asynchronously changes owner and group of a file. No arguments other than a possible exception are given to the completion callback.
Synchronously changes owner and group of a file. Returns undefined. This is the synchronous version of chown.
Closes the file descriptor. No arguments other than a possible exception are given to the completion callback.
Closes the file descriptor. Returns undefined.
Asynchronously copies src to dest. By default, dest is overwritten if it already exists. No arguments other than a possible exception are given to the callback function. Node.js makes no guarantees about the atomicity of the copy operation. If an error occurs after the destination file has been opened for writing, Node.js will attempt to remove the destination.
Synchronously copies src to dest. By default, dest is overwritten if it already exists. Returns undefined. Node.js makes no guarantees about the atomicity of the copy operation. If an error occurs after the destination file has been opened for writing, Node.js will attempt to remove the destination.
Asynchronously copies the entire directory structure from src to dest, including subdirectories and files.
Synchronously copies the entire directory structure from src to dest, including subdirectories and files.
options can include start and end values to read a range of bytes from the file instead of the entire file. Both start and end are inclusive and start counting at 0, allowed values are in the [0, Number.MAX_SAFE_INTEGER] range. If fd is specified and start is omitted or undefined, fs.createReadStream() reads sequentially from the current file position. The encoding can be any one of those accepted by Buffer.
options may also include a start option to allow writing data at some position past the beginning of the file, allowed values are in the [0, Number.MAX_SAFE_INTEGER] range. Modifying a file rather than replacing it may require the flags option to be set to r+ rather than the default w. The encoding can be any one of those accepted by Buffer.
Returns true if the path exists, false otherwise.
Sets the permissions on the file. No arguments other than a possible exception are given to the completion callback.
Sets the permissions on the file. Returns undefined.
Sets the owner of the file. No arguments other than a possible exception are given to the completion callback.
Sets the owner of the file. Returns undefined.
Forces all currently queued I/O operations associated with the file to the operating system's synchronized I/O completion state. Refer to the POSIX fdatasync(2) documentation for details. No arguments other than a possible exception are given to the completion callback.
Forces all currently queued I/O operations associated with the file to the operating system's synchronized I/O completion state. Refer to the POSIX fdatasync(2) documentation for details. Returns undefined.
Invokes the callback with the fs.Stats for the file descriptor.
Retrieves the fs.Stats for the file descriptor.
Request that all data for the open file descriptor is flushed to the storage device. The specific implementation is operating system and device specific. Refer to the POSIX fsync(2) documentation for more detail. No arguments other than a possible exception are given to the completion callback.
Request that all data for the open file descriptor is flushed to the storage device. The specific implementation is operating system and device specific. Refer to the POSIX fsync(2) documentation for more detail. Returns undefined.
Truncates the file descriptor. No arguments other than a possible exception are given to the completion callback.
Truncates the file descriptor. Returns undefined.
Change the file system timestamps of the object referenced by the supplied file descriptor. See utimes.
Synchronous version of futimes. Returns undefined.
Retrieves the files matching the specified pattern.
Retrieves the files matching the specified pattern.
Set the owner of the symbolic link. No arguments other than a possible exception are given to the completion callback.
Set the owner for the path. Returns undefined.
Creates a new link from the existingPath to the newPath. See the POSIX link(2) documentation for more detail. No arguments other than a possible exception are given to the completion callback.
Creates a new link from the existingPath to the newPath. See the POSIX link(2) documentation for more detail. Returns undefined.
Retrieves the fs.Stats for the symbolic link referred to by the path. The callback gets two arguments (err, stats) where stats is a fs.Stats object. lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is stat-ed, not the file that it refers to.
Changes the access and modification times of a file in the same way as utimes, with the difference that if the path refers to a symbolic link, then the link is not dereferenced: instead, the timestamps of the symbolic link itself are changed.
Change the file system timestamps of the symbolic link referenced by path. Returns undefined, or throws an exception when parameters are incorrect or the operation fails. This is the synchronous version of lutimes.
Asynchronously creates a directory.
Synchronously creates a directory. Returns undefined, or if recursive is true, the first directory path created. This is the synchronous version of mkdir.
Creates a unique temporary directory.
Returns the created directory path.
Asynchronous file open. See the POSIX open(2) documentation for more details.
Returns a Blob whose data is backed by the given file.
Asynchronously open a directory. See the POSIX opendir(3) documentation for more details.
Synchronously open a directory. See opendir(3).
Returns an integer representing the file descriptor.
Tests a user's permissions for the file or directory specified by path. The mode argument is an optional integer that specifies the accessibility checks to be performed. mode should be either the value fs.constants.F_OK or a mask consisting of the bitwise OR of any of fs.constants.R_OK, fs.constants.W_OK, and fs.constants.X_OK (e.g.fs.constants.W_OK | fs.constants.R_OK). Check File access constants for possible values of mode.
Asynchronously append data to a file, creating the file if it does not yet exist. data can be a string or a Buffer.
Changes the permissions of a file.
Changes the ownership of a file.
Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
Asynchronously copies the entire directory structure from src to dest, including subdirectories and files.
Retrieves the files matching the specified pattern.
Changes the ownership on a symbolic link.
Creates a new link from the existingPath to the newPath. See the POSIX link(2) documentation for more detail.
Equivalent to fsPromises.stat() unless path refers to a symbolic link, in which case the link itself is stat-ed, not the file that it refers to. Refer to the POSIX lstat(2) document for more detail.
Changes the access and modification times of a file in the same way as fsPromises.utimes(), with the difference that if the path refers to a symbolic link, then the link is not dereferenced: instead, the timestamps of the symbolic link itself are changed.
Asynchronously creates a directory.
Creates a unique temporary directory. A unique directory name is generated by appending six random characters to the end of the provided prefix. Due to platform inconsistencies, avoid trailing X characters in prefix. Some platforms, notably the BSDs, can return more than six random characters, and replace trailing X characters in prefix with random characters.
Opens a FileHandle.
Asynchronously open a directory for iterative scanning. See the POSIX opendir(3) documentation for more detail.
Reads the contents of a directory.
Asynchronously reads the entire contents of a file.
Reads the contents of the symbolic link referred to by path. See the POSIX readlink(2) documentation for more detail. The promise is fulfilled with thelinkString upon success.
Determines the actual location of path using the same semantics as the fs.realpath.native() function.
Renames oldPath to newPath.
Removes files and directories (modeled on the standard POSIX rm utility).
Removes the directory identified by path.
Creates a symbolic link.
Truncates (shortens or extends the length) of the content at path to len bytes.
If path refers to a symbolic link, then the link is removed without affecting the file or directory to which that link refers. If the path refers to a file path that is not a symbolic link, the file is deleted. See the POSIX unlink(2) documentation for more detail.
Change the file system timestamps of the object referenced by path.
Returns an async iterator that watches for changes on filename, where filenameis either a file or a directory.
Asynchronously writes data to a file, replacing the file if it already exists. data can be a string, a buffer, an AsyncIterable, or an Iterable object.
Read data from the file specified by fd.
Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'.
Reads the contents of the directory.
Asynchronously reads the entire contents of a file.
Returns the contents of the path.
Reads the contents of the symbolic link referred to by path. The callback gets two arguments (err, linkString).
Returns the symbolic link's string value.
Returns the number of bytesRead.
Read from a file specified by fd and write to an array of ArrayBufferViews using readv().
For detailed information, see the documentation of the asynchronous version of this API: readv.
Asynchronously computes the canonical pathname by resolving ., .., and symbolic links.
Asynchronous realpath(3).
Returns the resolved pathname.
Asynchronously rename file at oldPath to the pathname provided as newPath. In the case that newPath already exists, it will be overwritten. If there is a directory at newPath, an error will be raised instead. No arguments other than a possible exception are given to the completion callback.
Renames the file from oldPath to newPath. Returns undefined.
Asynchronously removes files and directories (modeled on the standard POSIX rm utility). No arguments other than a possible exception are given to the completion callback.
Asynchronous rmdir(2). No arguments other than a possible exception are given to the completion callback.
Synchronous rmdir(2). Returns undefined.
Synchronously removes files and directories (modeled on the standard POSIX rm utility). Returns undefined.
Asynchronous stat(2). The callback gets two arguments (err, stats) wherestats is an fs.Stats object.
Asynchronous statfs(2). Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where statsis an fs.StatFs object.
Synchronous statfs(2). Returns information about the mounted file system which contains path.
Creates the link called path pointing to target. No arguments other than a possible exception are given to the completion callback.
Returns undefined.
Truncates the file. No arguments other than a possible exception are given to the completion callback. A file descriptor can also be passed as the first argument. In this case, fs.ftruncate() is called.
Truncates the file. Returns undefined. A file descriptor can also be passed as the first argument. In this case, fs.ftruncateSync() is called.
Asynchronously removes a file or symbolic link. No arguments other than a possible exception are given to the completion callback.
Synchronous unlink(2). Returns undefined.
Stop watching for changes on filename. If listener is specified, only that particular listener is removed. Otherwise, all listeners are removed, effectively stopping watching of filename.
Change the file system timestamps of the object referenced by path.
Returns undefined.
Watch for changes on filename, where filename is either a file or a directory.
Watch for changes on filename. The callback listener will be called each time the file is accessed.
Write buffer to the file specified by fd.
For detailed information, see the documentation of the asynchronous version of this API: write.
Write an array of ArrayBufferViews to the file specified by fd using writev().
For detailed information, see the documentation of the asynchronous version of this API: writev.
Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false:
Changes the permissions on a symbolic link. No arguments other than a possible exception are given to the completion callback.
Changes the permissions on a symbolic link. Returns undefined.
A fs.Stats object provides information about a file.
Provides information about a mounted file system.
Class: fs.StatWatcher
Watch for changes on filename. The callback listener will be called each time the file is accessed.
The fs/promises API provides asynchronous file system methods that return promises.
string & {} allows to allow any kind of strings for the event but still allows to have auto completion for the normal events.
Valid types for path values in "fs".
The Keys are events of the ReadStream and the values are the functions that are called when the event is emitted.
The Keys are events of the WriteStream and the values are the functions that are called when the event is emitted.
Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists.
Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. If the underlying platform does not support copy-on-write, then the operation will fail with an error.
Constant for fs.access(). File is visible to the calling process.
Constant for fs.open(). Flag indicating that data will be appended to the end of the file.
Constant for fs.open(). Flag indicating to create the file if it does not already exist.
Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O.
Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory.
Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity.
Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists.
constant for fs.open(). Flag indicating reading accesses to the file system will no longer result in an update to the atime information associated with the file. This flag is available on Linux operating systems only.
Constant for fs.open(). Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one).
Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link.
Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible.
Constant for fs.open(). Flag indicating to open a file for read-only access.
Constant for fs.open(). Flag indicating to open a file for read-write access.
Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to.
Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O.
Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero.
Constant for fs.open(). Flag indicating to open a file for write-only access.
Constant for fs.access(). File can be read by the calling process.
Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file.
Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file.
Constant for fs.Stats mode property for determining a file's type. File type constant for a directory.
Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe.
Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link.
Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code.
Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file.
Constant for fs.Stats mode property for determining a file's type. File type constant for a socket.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others.
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner.
When set, a memory file mapping is used to access the file. This flag is available on Windows operating systems only. On other operating systems, this flag is ignored.
Constant for fs.access(). File can be written by the calling process.
Constant for fs.access(). File can be executed by the calling process.
Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
Synchronous stat(2) - Get file status.
node:fs/promises
-
access
Tests a user's permissions for the file or directory specified by
path. Themodeargument is an optional integer that specifies the accessibility checks to be performed.modeshould be either the valuefs.constants.F_OKor a mask consisting of the bitwise OR of any offs.constants.R_OK,fs.constants.W_OK, andfs.constants.X_OK(e.g.fs.constants.W_OK | fs.constants.R_OK). CheckFile access constantsfor possible values ofmode. -
appendFile
Asynchronously append data to a file, creating the file if it does not yet exist.
datacan be a string or aBuffer. -
chmod
Changes the permissions of a file.
-
chown
Changes the ownership of a file.
-
copyFile
Asynchronously copies
srctodest. By default,destis overwritten if it already exists. -
cp
Asynchronously copies the entire directory structure from
srctodest, including subdirectories and files. -
glob
Retrieves the files matching the specified pattern.
-
lchown
Changes the ownership on a symbolic link.
-
link
Creates a new link from the
existingPathto thenewPath. See the POSIXlink(2)documentation for more detail. -
lstat
Equivalent to
fsPromises.stat()unlesspathrefers to a symbolic link, in which case the link itself is stat-ed, not the file that it refers to. Refer to the POSIXlstat(2)document for more detail. -
lutimes
Changes the access and modification times of a file in the same way as
fsPromises.utimes(), with the difference that if the path refers to a symbolic link, then the link is not dereferenced: instead, the timestamps of the symbolic link itself are changed. -
mkdir
Asynchronously creates a directory.
-
mkdtemp
Creates a unique temporary directory. A unique directory name is generated by appending six random characters to the end of the provided
prefix. Due to platform inconsistencies, avoid trailingXcharacters inprefix. Some platforms, notably the BSDs, can return more than six random characters, and replace trailingXcharacters inprefixwith random characters. -
open
Opens a
FileHandle. -
opendir
Asynchronously open a directory for iterative scanning. See the POSIX
opendir(3)documentation for more detail. -
readdir
Reads the contents of a directory.
-
readFile
Asynchronously reads the entire contents of a file.
-
readlink
Reads the contents of the symbolic link referred to by
path. See the POSIXreadlink(2)documentation for more detail. The promise is fulfilled with thelinkStringupon success. -
realpath
Determines the actual location of
pathusing the same semantics as thefs.realpath.native()function. -
rename
Renames
oldPathtonewPath. -
rm
Removes files and directories (modeled on the standard POSIX
rmutility). -
rmdir
Removes the directory identified by
path. - stat
- statfs
-
symlink
Creates a symbolic link.
-
truncate
Truncates (shortens or extends the length) of the content at
pathtolenbytes. -
unlink
If
pathrefers to a symbolic link, then the link is removed without affecting the file or directory to which that link refers. If thepathrefers to a file path that is not a symbolic link, the file is deleted. See the POSIXunlink(2)documentation for more detail. -
utimes
Change the file system timestamps of the object referenced by
path. -
watch
Returns an async iterator that watches for changes on
filename, wherefilenameis either a file or a directory. -
writeFile
Asynchronously writes data to a file, replacing the file if it already exists.
datacan be a string, a buffer, an AsyncIterable, or an Iterable object. - lchmod
- CreateReadStreamOptions
- CreateWriteStreamOptions
- FileChangeInfo
- FileHandle
- FileReadOptions
- FileReadResult
- FlagAndOpenMode
- ReadableWebStreamOptions
- constants
node:http
-
Agent
An
Agentis responsible for managing connection persistence and reuse for HTTP clients. It maintains a queue of pending requests for a given host and port, reusing a single socket connection for each until the queue is empty, at which time the socket is either destroyed or put into a pool where it is kept to be used again for requests to the same host and port. Whether it is destroyed or pooled depends on thekeepAliveoption. - ClientRequest
-
IncomingMessage
An
IncomingMessageobject is created by Server or ClientRequest and passed as the first argument to the'request'and'response'event respectively. It may be used to access response status, headers, and data. -
OutgoingMessage
This class serves as the parent class of ClientRequest and ServerResponse. It is an abstract outgoing message from the perspective of the participants of an HTTP transaction.
- Server
-
ServerResponse
This object is created internally by an HTTP server, not by the user. It is passed as the second parameter to the
'request'event. -
createServer
Returns a new instance of Server.
- get
- request
-
setMaxIdleHTTPParsers
Set the maximum number of idle HTTP parsers.
-
validateHeaderName
Performs the low-level validations on the provided
namethat are done whenres.setHeader(name, value)is called. -
validateHeaderValue
Performs the low-level validations on the provided
valuethat are done whenres.setHeader(name, value)is called. - AgentOptions
- ClientRequestArgs
- IncomingHttpHeaders
- InformationEvent
- OutgoingHttpHeaders
- RequestOptions
- ServerOptions
- OutgoingHttpHeader
- RequestListener
- CloseEvent
-
globalAgent
Global instance of
Agentwhich is used as the default for all HTTP client requests. Diverges from a defaultAgentconfiguration by havingkeepAliveenabled and atimeoutof 5 seconds. -
maxHeaderSize
Read-only property specifying the maximum allowed size of HTTP headers in bytes. Defaults to 16KB. Configurable using the
--max-http-header-sizeCLI option. - MessageEvent
- METHODS
- STATUS_CODES
-
WebSocket
A browser-compatible implementation of WebSocket.
node:http2
-
Http2ServerRequest
A
Http2ServerRequestobject is created by Server or SecureServer and passed as the first argument to the'request'event. It may be used to access a request status, headers, and data. -
Http2ServerResponse
This object is created internally by an HTTP server, not by the user. It is passed as the second parameter to the
'request'event. -
connect
Returns a
ClientHttp2Sessioninstance. -
createSecureServer
Returns a
tls.Serverinstance that creates and managesHttp2Sessioninstances. -
createServer
Returns a
net.Serverinstance that creates and managesHttp2Sessioninstances. - getDefaultSettings
- getPackedSettings
- getUnpackedSettings
-
performServerHandshake
Create an HTTP/2 server session from an existing socket.
- AlternativeServiceOptions
- ClientHttp2Session
- ClientHttp2Stream
- ClientSessionOptions
- ClientSessionRequestOptions
- Http2SecureServer
- Http2Server
- HTTP2ServerCommon
- Http2Session
- Http2Stream
- IncomingHttpHeaders
- IncomingHttpStatusHeader
- OutgoingHttpHeaders
- SecureClientSessionOptions
- SecureServerOptions
- SecureServerSessionOptions
- ServerHttp2Session
- ServerHttp2Stream
- ServerOptions
- ServerSessionOptions
- ServerStreamFileResponseOptions
- ServerStreamFileResponseOptionsWithError
- ServerStreamResponseOptions
- SessionOptions
- SessionState
- Settings
- StatOptions
- StreamPriorityOptions
- StreamState
- constants
- constants.DEFAULT_SETTINGS_ENABLE_PUSH
- constants.DEFAULT_SETTINGS_HEADER_TABLE_SIZE
- constants.DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE
- constants.DEFAULT_SETTINGS_MAX_FRAME_SIZE
- constants.HTTP2_HEADER_ACCEPT
- constants.HTTP2_HEADER_ACCEPT_CHARSET
- constants.HTTP2_HEADER_ACCEPT_ENCODING
- constants.HTTP2_HEADER_ACCEPT_LANGUAGE
- constants.HTTP2_HEADER_ACCEPT_RANGES
- constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS
- constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS
- constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS
- constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN
- constants.HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS
- constants.HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS
- constants.HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD
- constants.HTTP2_HEADER_AGE
- constants.HTTP2_HEADER_ALLOW
- constants.HTTP2_HEADER_AUTHORITY
- constants.HTTP2_HEADER_AUTHORIZATION
- constants.HTTP2_HEADER_CACHE_CONTROL
- constants.HTTP2_HEADER_CONNECTION
- constants.HTTP2_HEADER_CONTENT_DISPOSITION
- constants.HTTP2_HEADER_CONTENT_ENCODING
- constants.HTTP2_HEADER_CONTENT_LANGUAGE
- constants.HTTP2_HEADER_CONTENT_LENGTH
- constants.HTTP2_HEADER_CONTENT_LOCATION
- constants.HTTP2_HEADER_CONTENT_MD5
- constants.HTTP2_HEADER_CONTENT_RANGE
- constants.HTTP2_HEADER_CONTENT_TYPE
- constants.HTTP2_HEADER_COOKIE
- constants.HTTP2_HEADER_DATE
- constants.HTTP2_HEADER_ETAG
- constants.HTTP2_HEADER_EXPECT
- constants.HTTP2_HEADER_EXPIRES
- constants.HTTP2_HEADER_FROM
- constants.HTTP2_HEADER_HOST
- constants.HTTP2_HEADER_HTTP2_SETTINGS
- constants.HTTP2_HEADER_IF_MATCH
- constants.HTTP2_HEADER_IF_MODIFIED_SINCE
- constants.HTTP2_HEADER_IF_NONE_MATCH
- constants.HTTP2_HEADER_IF_RANGE
- constants.HTTP2_HEADER_IF_UNMODIFIED_SINCE
- constants.HTTP2_HEADER_KEEP_ALIVE
- constants.HTTP2_HEADER_LAST_MODIFIED
- constants.HTTP2_HEADER_LINK
- constants.HTTP2_HEADER_LOCATION
- constants.HTTP2_HEADER_MAX_FORWARDS
- constants.HTTP2_HEADER_METHOD
- constants.HTTP2_HEADER_PATH
- constants.HTTP2_HEADER_PREFER
- constants.HTTP2_HEADER_PROXY_AUTHENTICATE
- constants.HTTP2_HEADER_PROXY_AUTHORIZATION
- constants.HTTP2_HEADER_PROXY_CONNECTION
- constants.HTTP2_HEADER_RANGE
- constants.HTTP2_HEADER_REFERER
- constants.HTTP2_HEADER_REFRESH
- constants.HTTP2_HEADER_RETRY_AFTER
- constants.HTTP2_HEADER_SCHEME
- constants.HTTP2_HEADER_SERVER
- constants.HTTP2_HEADER_SET_COOKIE
- constants.HTTP2_HEADER_STATUS
- constants.HTTP2_HEADER_STRICT_TRANSPORT_SECURITY
- constants.HTTP2_HEADER_TE
- constants.HTTP2_HEADER_TRANSFER_ENCODING
- constants.HTTP2_HEADER_UPGRADE
- constants.HTTP2_HEADER_USER_AGENT
- constants.HTTP2_HEADER_VARY
- constants.HTTP2_HEADER_VIA
- constants.HTTP2_HEADER_WWW_AUTHENTICATE
- constants.HTTP2_METHOD_ACL
- constants.HTTP2_METHOD_BASELINE_CONTROL
- constants.HTTP2_METHOD_BIND
- constants.HTTP2_METHOD_CHECKIN
- constants.HTTP2_METHOD_CHECKOUT
- constants.HTTP2_METHOD_CONNECT
- constants.HTTP2_METHOD_COPY
- constants.HTTP2_METHOD_DELETE
- constants.HTTP2_METHOD_GET
- constants.HTTP2_METHOD_HEAD
- constants.HTTP2_METHOD_LABEL
- constants.HTTP2_METHOD_LINK
- constants.HTTP2_METHOD_LOCK
- constants.HTTP2_METHOD_MERGE
- constants.HTTP2_METHOD_MKACTIVITY
- constants.HTTP2_METHOD_MKCALENDAR
- constants.HTTP2_METHOD_MKCOL
- constants.HTTP2_METHOD_MKREDIRECTREF
- constants.HTTP2_METHOD_MKWORKSPACE
- constants.HTTP2_METHOD_MOVE
- constants.HTTP2_METHOD_OPTIONS
- constants.HTTP2_METHOD_ORDERPATCH
- constants.HTTP2_METHOD_PATCH
- constants.HTTP2_METHOD_POST
- constants.HTTP2_METHOD_PRI
- constants.HTTP2_METHOD_PROPFIND
- constants.HTTP2_METHOD_PROPPATCH
- constants.HTTP2_METHOD_PUT
- constants.HTTP2_METHOD_REBIND
- constants.HTTP2_METHOD_REPORT
- constants.HTTP2_METHOD_SEARCH
- constants.HTTP2_METHOD_TRACE
- constants.HTTP2_METHOD_UNBIND
- constants.HTTP2_METHOD_UNCHECKOUT
- constants.HTTP2_METHOD_UNLINK
- constants.HTTP2_METHOD_UNLOCK
- constants.HTTP2_METHOD_UPDATE
- constants.HTTP2_METHOD_UPDATEREDIRECTREF
- constants.HTTP2_METHOD_VERSION_CONTROL
- constants.HTTP_STATUS_ACCEPTED
- constants.HTTP_STATUS_ALREADY_REPORTED
- constants.HTTP_STATUS_BAD_GATEWAY
- constants.HTTP_STATUS_BAD_REQUEST
- constants.HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED
- constants.HTTP_STATUS_CONFLICT
- constants.HTTP_STATUS_CONTINUE
- constants.HTTP_STATUS_CREATED
- constants.HTTP_STATUS_EXPECTATION_FAILED
- constants.HTTP_STATUS_FAILED_DEPENDENCY
- constants.HTTP_STATUS_FORBIDDEN
- constants.HTTP_STATUS_FOUND
- constants.HTTP_STATUS_GATEWAY_TIMEOUT
- constants.HTTP_STATUS_GONE
- constants.HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED
- constants.HTTP_STATUS_IM_USED
- constants.HTTP_STATUS_INSUFFICIENT_STORAGE
- constants.HTTP_STATUS_INTERNAL_SERVER_ERROR
- constants.HTTP_STATUS_LENGTH_REQUIRED
- constants.HTTP_STATUS_LOCKED
- constants.HTTP_STATUS_LOOP_DETECTED
- constants.HTTP_STATUS_METHOD_NOT_ALLOWED
- constants.HTTP_STATUS_MISDIRECTED_REQUEST
- constants.HTTP_STATUS_MOVED_PERMANENTLY
- constants.HTTP_STATUS_MULTI_STATUS
- constants.HTTP_STATUS_MULTIPLE_CHOICES
- constants.HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED
- constants.HTTP_STATUS_NO_CONTENT
- constants.HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION
- constants.HTTP_STATUS_NOT_ACCEPTABLE
- constants.HTTP_STATUS_NOT_EXTENDED
- constants.HTTP_STATUS_NOT_FOUND
- constants.HTTP_STATUS_NOT_IMPLEMENTED
- constants.HTTP_STATUS_NOT_MODIFIED
- constants.HTTP_STATUS_OK
- constants.HTTP_STATUS_PARTIAL_CONTENT
- constants.HTTP_STATUS_PAYLOAD_TOO_LARGE
- constants.HTTP_STATUS_PAYMENT_REQUIRED
- constants.HTTP_STATUS_PERMANENT_REDIRECT
- constants.HTTP_STATUS_PRECONDITION_FAILED
- constants.HTTP_STATUS_PRECONDITION_REQUIRED
- constants.HTTP_STATUS_PROCESSING
- constants.HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED
- constants.HTTP_STATUS_RANGE_NOT_SATISFIABLE
- constants.HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE
- constants.HTTP_STATUS_REQUEST_TIMEOUT
- constants.HTTP_STATUS_RESET_CONTENT
- constants.HTTP_STATUS_SEE_OTHER
- constants.HTTP_STATUS_SERVICE_UNAVAILABLE
- constants.HTTP_STATUS_SWITCHING_PROTOCOLS
- constants.HTTP_STATUS_TEAPOT
- constants.HTTP_STATUS_TEMPORARY_REDIRECT
- constants.HTTP_STATUS_TOO_MANY_REQUESTS
- constants.HTTP_STATUS_UNAUTHORIZED
- constants.HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS
- constants.HTTP_STATUS_UNORDERED_COLLECTION
- constants.HTTP_STATUS_UNPROCESSABLE_ENTITY
- constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE
- constants.HTTP_STATUS_UPGRADE_REQUIRED
- constants.HTTP_STATUS_URI_TOO_LONG
- constants.HTTP_STATUS_USE_PROXY
- constants.HTTP_STATUS_VARIANT_ALSO_NEGOTIATES
- constants.MAX_INITIAL_WINDOW_SIZE
- constants.MAX_MAX_FRAME_SIZE
- constants.MIN_MAX_FRAME_SIZE
- constants.NGHTTP2_CANCEL
- constants.NGHTTP2_COMPRESSION_ERROR
- constants.NGHTTP2_CONNECT_ERROR
- constants.NGHTTP2_DEFAULT_WEIGHT
- constants.NGHTTP2_ENHANCE_YOUR_CALM
- constants.NGHTTP2_ERR_FRAME_SIZE_ERROR
- constants.NGHTTP2_FLAG_ACK
- constants.NGHTTP2_FLAG_END_HEADERS
- constants.NGHTTP2_FLAG_END_STREAM
- constants.NGHTTP2_FLAG_NONE
- constants.NGHTTP2_FLAG_PADDED
- constants.NGHTTP2_FLAG_PRIORITY
- constants.NGHTTP2_FLOW_CONTROL_ERROR
- constants.NGHTTP2_FRAME_SIZE_ERROR
- constants.NGHTTP2_HTTP_1_1_REQUIRED
- constants.NGHTTP2_INADEQUATE_SECURITY
- constants.NGHTTP2_INTERNAL_ERROR
- constants.NGHTTP2_NO_ERROR
- constants.NGHTTP2_PROTOCOL_ERROR
- constants.NGHTTP2_REFUSED_STREAM
- constants.NGHTTP2_SESSION_CLIENT
- constants.NGHTTP2_SESSION_SERVER
- constants.NGHTTP2_SETTINGS_ENABLE_PUSH
- constants.NGHTTP2_SETTINGS_HEADER_TABLE_SIZE
- constants.NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE
- constants.NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS
- constants.NGHTTP2_SETTINGS_MAX_FRAME_SIZE
- constants.NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE
- constants.NGHTTP2_SETTINGS_TIMEOUT
- constants.NGHTTP2_STREAM_CLOSED
- constants.NGHTTP2_STREAM_STATE_CLOSED
- constants.NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL
- constants.NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE
- constants.NGHTTP2_STREAM_STATE_IDLE
- constants.NGHTTP2_STREAM_STATE_OPEN
- constants.NGHTTP2_STREAM_STATE_RESERVED_LOCAL
- constants.NGHTTP2_STREAM_STATE_RESERVED_REMOTE
- constants.PADDING_STRATEGY_CALLBACK
- constants.PADDING_STRATEGY_MAX
- constants.PADDING_STRATEGY_NONE
-
sensitiveHeaders
This symbol can be set as a property on the HTTP/2 headers object with an array value in order to provide a list of headers considered sensitive.
node:https
-
Agent
An
Agentobject for HTTPS similar tohttp.Agent. See request for more information. -
createServer
Or
-
get
Like
http.get()but for HTTPS. -
request
Makes a request to a secure web server.
- AgentOptions
- Server
- RequestOptions
- ServerOptions
- globalAgent
node:inspector
-
Session
The
inspector.Sessionis used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. -
close
Deactivate the inspector. Blocks until there are no active connections.
-
Network.loadingFailed
This feature is only available with the
--experimental-network-inspectionflag enabled. -
Network.loadingFinished
This feature is only available with the
--experimental-network-inspectionflag enabled. -
Network.requestWillBeSent
This feature is only available with the
--experimental-network-inspectionflag enabled. -
Network.responseReceived
This feature is only available with the
--experimental-network-inspectionflag enabled. -
open
Activate inspector on host and port. Equivalent to
node --inspect=[[host:]port], but can be done programmatically after node has started. -
url
Return the URL of the active inspector, or
undefinedif there is none. -
waitForDebugger
Blocks until a client (existing or connected later) has sent
Runtime.runIfWaitingForDebuggercommand. -
Console.ConsoleMessage
Console message.
- Console.MessageAddedEventDataType
- Debugger.BreakLocation
- Debugger.BreakpointResolvedEventDataType
-
Debugger.CallFrame
JavaScript call frame. Array of call frames form the call stack.
- Debugger.ContinueToLocationParameterType
- Debugger.EnableReturnType
- Debugger.EvaluateOnCallFrameParameterType
- Debugger.EvaluateOnCallFrameReturnType
- Debugger.GetPossibleBreakpointsParameterType
- Debugger.GetPossibleBreakpointsReturnType
- Debugger.GetScriptSourceParameterType
- Debugger.GetScriptSourceReturnType
- Debugger.GetStackTraceParameterType
- Debugger.GetStackTraceReturnType
-
Debugger.Location
Location in the source code.
- Debugger.PausedEventDataType
- Debugger.PauseOnAsyncCallParameterType
- Debugger.RemoveBreakpointParameterType
- Debugger.RestartFrameParameterType
- Debugger.RestartFrameReturnType
-
Debugger.Scope
Scope description.
- Debugger.ScriptFailedToParseEventDataType
- Debugger.ScriptParsedEventDataType
-
Debugger.ScriptPosition
Location in the source code.
- Debugger.SearchInContentParameterType
- Debugger.SearchInContentReturnType
-
Debugger.SearchMatch
Search match for resource.
- Debugger.SetAsyncCallStackDepthParameterType
- Debugger.SetBlackboxedRangesParameterType
- Debugger.SetBlackboxPatternsParameterType
- Debugger.SetBreakpointByUrlParameterType
- Debugger.SetBreakpointByUrlReturnType
- Debugger.SetBreakpointParameterType
- Debugger.SetBreakpointReturnType
- Debugger.SetBreakpointsActiveParameterType
- Debugger.SetPauseOnExceptionsParameterType
- Debugger.SetReturnValueParameterType
- Debugger.SetScriptSourceParameterType
- Debugger.SetScriptSourceReturnType
- Debugger.SetSkipAllPausesParameterType
- Debugger.SetVariableValueParameterType
- Debugger.StepIntoParameterType
- HeapProfiler.AddHeapSnapshotChunkEventDataType
- HeapProfiler.AddInspectedHeapObjectParameterType
- HeapProfiler.GetHeapObjectIdParameterType
- HeapProfiler.GetHeapObjectIdReturnType
- HeapProfiler.GetObjectByHeapObjectIdParameterType
- HeapProfiler.GetObjectByHeapObjectIdReturnType
- HeapProfiler.GetSamplingProfileReturnType
- HeapProfiler.HeapStatsUpdateEventDataType
- HeapProfiler.LastSeenObjectIdEventDataType
- HeapProfiler.ReportHeapSnapshotProgressEventDataType
-
HeapProfiler.SamplingHeapProfile
Profile.
-
HeapProfiler.SamplingHeapProfileNode
Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
- HeapProfiler.StartSamplingParameterType
- HeapProfiler.StartTrackingHeapObjectsParameterType
- HeapProfiler.StopSamplingReturnType
- HeapProfiler.StopTrackingHeapObjectsParameterType
- HeapProfiler.TakeHeapSnapshotParameterType
- InspectorConsole
- InspectorNotification
-
Network.Headers
Request / response headers as keys / values of JSON object.
- Network.LoadingFailedEventDataType
- Network.LoadingFinishedEventDataType
-
Network.Request
HTTP request data.
- Network.RequestWillBeSentEventDataType
-
Network.Response
HTTP response data.
- Network.ResponseReceivedEventDataType
- NodeRuntime.NotifyWhenWaitingForDisconnectParameterType
- NodeTracing.DataCollectedEventDataType
- NodeTracing.GetCategoriesReturnType
- NodeTracing.StartParameterType
- NodeTracing.TraceConfig
- NodeWorker.AttachedToWorkerEventDataType
- NodeWorker.DetachedFromWorkerEventDataType
- NodeWorker.DetachParameterType
- NodeWorker.EnableParameterType
- NodeWorker.ReceivedMessageFromWorkerEventDataType
- NodeWorker.SendMessageToWorkerParameterType
- NodeWorker.WorkerInfo
- Profiler.ConsoleProfileFinishedEventDataType
- Profiler.ConsoleProfileStartedEventDataType
-
Profiler.CoverageRange
Coverage data for a source range.
-
Profiler.FunctionCoverage
Coverage data for a JavaScript function.
- Profiler.GetBestEffortCoverageReturnType
-
Profiler.PositionTickInfo
Specifies a number of samples attributed to a certain source position.
-
Profiler.Profile
Profile.
-
Profiler.ProfileNode
Profile node. Holds callsite information, execution statistics and child nodes.
-
Profiler.ScriptCoverage
Coverage data for a JavaScript script.
- Profiler.SetSamplingIntervalParameterType
- Profiler.StartPreciseCoverageParameterType
- Profiler.StopReturnType
- Profiler.TakePreciseCoverageReturnType
- Runtime.AwaitPromiseParameterType
- Runtime.AwaitPromiseReturnType
-
Runtime.CallArgument
Represents function call argument. Either remote object id
objectId, primitivevalue, unserializable primitive value or neither of (for undefined) them should be specified. -
Runtime.CallFrame
Stack entry for runtime errors and assertions.
- Runtime.CallFunctionOnParameterType
- Runtime.CallFunctionOnReturnType
- Runtime.CompileScriptParameterType
- Runtime.CompileScriptReturnType
- Runtime.ConsoleAPICalledEventDataType
- Runtime.CustomPreview
- Runtime.EntryPreview
- Runtime.EvaluateParameterType
- Runtime.EvaluateReturnType
-
Runtime.ExceptionDetails
Detailed information about exception (or error) that was thrown during script compilation or execution.
- Runtime.ExceptionRevokedEventDataType
- Runtime.ExceptionThrownEventDataType
- Runtime.ExecutionContextCreatedEventDataType
-
Runtime.ExecutionContextDescription
Description of an isolated world.
- Runtime.ExecutionContextDestroyedEventDataType
- Runtime.GetPropertiesParameterType
- Runtime.GetPropertiesReturnType
- Runtime.GlobalLexicalScopeNamesParameterType
- Runtime.GlobalLexicalScopeNamesReturnType
- Runtime.InspectRequestedEventDataType
-
Runtime.InternalPropertyDescriptor
Object internal property descriptor. This property isn't normally visible in JavaScript code.
-
Runtime.ObjectPreview
Object containing abbreviated remote object value.
-
Runtime.PropertyDescriptor
Object property descriptor.
- Runtime.PropertyPreview
- Runtime.QueryObjectsParameterType
- Runtime.QueryObjectsReturnType
- Runtime.ReleaseObjectGroupParameterType
- Runtime.ReleaseObjectParameterType
-
Runtime.RemoteObject
Mirror object referencing original JavaScript object.
- Runtime.RunScriptParameterType
- Runtime.RunScriptReturnType
- Runtime.SetCustomObjectFormatterEnabledParameterType
-
Runtime.StackTrace
Call frames for assertions or error messages.
-
Runtime.StackTraceId
If
debuggerIdis set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. SeeRuntime.StackTraceandDebugger.pausedfor usages. -
Schema.Domain
Description of the protocol domain.
- Schema.GetDomainsReturnType
- Console
- Debugger
- HeapProfiler
- Network
- NodeRuntime
- NodeTracing
- NodeWorker
- Profiler
- Runtime
- Schema
-
Debugger.BreakpointId
Breakpoint identifier.
-
Debugger.CallFrameId
Call frame identifier.
-
HeapProfiler.HeapSnapshotObjectId
Heap snapshot object id.
-
Network.MonotonicTime
Monotonically increasing time in seconds since an arbitrary point in the past.
-
Network.RequestId
Unique request identifier.
-
Network.ResourceType
Resource type as it was perceived by the rendering engine.
-
Network.TimeSinceEpoch
UTC time in seconds, counted from January 1, 1970.
-
NodeWorker.SessionID
Unique identifier of attached debugging session.
- NodeWorker.WorkerID
-
Runtime.ExecutionContextId
Id of an execution context.
-
Runtime.RemoteObjectId
Unique object identifier.
-
Runtime.ScriptId
Unique script identifier.
-
Runtime.Timestamp
Number of milliseconds since epoch.
-
Runtime.UniqueDebuggerId
Unique identifier of current debugger.
-
Runtime.UnserializableValue
Primitive value which cannot be JSON-stringified.
-
console
An object to send messages to the remote inspector console.
node:inspector/promises
-
Session
The
inspector.Sessionis used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. -
close
Deactivate the inspector. Blocks until there are no active connections.
-
Network.loadingFailed
This feature is only available with the
--experimental-network-inspectionflag enabled. -
Network.loadingFinished
This feature is only available with the
--experimental-network-inspectionflag enabled. -
Network.requestWillBeSent
This feature is only available with the
--experimental-network-inspectionflag enabled. -
Network.responseReceived
This feature is only available with the
--experimental-network-inspectionflag enabled. -
open
Activate inspector on host and port. Equivalent to
node --inspect=[[host:]port], but can be done programmatically after node has started. -
url
Return the URL of the active inspector, or
undefinedif there is none. -
waitForDebugger
Blocks until a client (existing or connected later) has sent
Runtime.runIfWaitingForDebuggercommand. -
Console.ConsoleMessage
Console message.
- Console.MessageAddedEventDataType
- Debugger.BreakLocation
- Debugger.BreakpointResolvedEventDataType
-
Debugger.CallFrame
JavaScript call frame. Array of call frames form the call stack.
- Debugger.ContinueToLocationParameterType
- Debugger.EnableReturnType
- Debugger.EvaluateOnCallFrameParameterType
- Debugger.EvaluateOnCallFrameReturnType
- Debugger.GetPossibleBreakpointsParameterType
- Debugger.GetPossibleBreakpointsReturnType
- Debugger.GetScriptSourceParameterType
- Debugger.GetScriptSourceReturnType
- Debugger.GetStackTraceParameterType
- Debugger.GetStackTraceReturnType
-
Debugger.Location
Location in the source code.
- Debugger.PausedEventDataType
- Debugger.PauseOnAsyncCallParameterType
- Debugger.RemoveBreakpointParameterType
- Debugger.RestartFrameParameterType
- Debugger.RestartFrameReturnType
-
Debugger.Scope
Scope description.
- Debugger.ScriptFailedToParseEventDataType
- Debugger.ScriptParsedEventDataType
-
Debugger.ScriptPosition
Location in the source code.
- Debugger.SearchInContentParameterType
- Debugger.SearchInContentReturnType
-
Debugger.SearchMatch
Search match for resource.
- Debugger.SetAsyncCallStackDepthParameterType
- Debugger.SetBlackboxedRangesParameterType
- Debugger.SetBlackboxPatternsParameterType
- Debugger.SetBreakpointByUrlParameterType
- Debugger.SetBreakpointByUrlReturnType
- Debugger.SetBreakpointParameterType
- Debugger.SetBreakpointReturnType
- Debugger.SetBreakpointsActiveParameterType
- Debugger.SetPauseOnExceptionsParameterType
- Debugger.SetReturnValueParameterType
- Debugger.SetScriptSourceParameterType
- Debugger.SetScriptSourceReturnType
- Debugger.SetSkipAllPausesParameterType
- Debugger.SetVariableValueParameterType
- Debugger.StepIntoParameterType
- HeapProfiler.AddHeapSnapshotChunkEventDataType
- HeapProfiler.AddInspectedHeapObjectParameterType
- HeapProfiler.GetHeapObjectIdParameterType
- HeapProfiler.GetHeapObjectIdReturnType
- HeapProfiler.GetObjectByHeapObjectIdParameterType
- HeapProfiler.GetObjectByHeapObjectIdReturnType
- HeapProfiler.GetSamplingProfileReturnType
- HeapProfiler.HeapStatsUpdateEventDataType
- HeapProfiler.LastSeenObjectIdEventDataType
- HeapProfiler.ReportHeapSnapshotProgressEventDataType
-
HeapProfiler.SamplingHeapProfile
Profile.
-
HeapProfiler.SamplingHeapProfileNode
Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
- HeapProfiler.StartSamplingParameterType
- HeapProfiler.StartTrackingHeapObjectsParameterType
- HeapProfiler.StopSamplingReturnType
- HeapProfiler.StopTrackingHeapObjectsParameterType
- HeapProfiler.TakeHeapSnapshotParameterType
- InspectorNotification
-
Network.Headers
Request / response headers as keys / values of JSON object.
- Network.LoadingFailedEventDataType
- Network.LoadingFinishedEventDataType
-
Network.Request
HTTP request data.
- Network.RequestWillBeSentEventDataType
-
Network.Response
HTTP response data.
- Network.ResponseReceivedEventDataType
- NodeRuntime.NotifyWhenWaitingForDisconnectParameterType
- NodeTracing.DataCollectedEventDataType
- NodeTracing.GetCategoriesReturnType
- NodeTracing.StartParameterType
- NodeTracing.TraceConfig
- NodeWorker.AttachedToWorkerEventDataType
- NodeWorker.DetachedFromWorkerEventDataType
- NodeWorker.DetachParameterType
- NodeWorker.EnableParameterType
- NodeWorker.ReceivedMessageFromWorkerEventDataType
- NodeWorker.SendMessageToWorkerParameterType
- NodeWorker.WorkerInfo
- Profiler.ConsoleProfileFinishedEventDataType
- Profiler.ConsoleProfileStartedEventDataType
-
Profiler.CoverageRange
Coverage data for a source range.
-
Profiler.FunctionCoverage
Coverage data for a JavaScript function.
- Profiler.GetBestEffortCoverageReturnType
-
Profiler.PositionTickInfo
Specifies a number of samples attributed to a certain source position.
-
Profiler.Profile
Profile.
-
Profiler.ProfileNode
Profile node. Holds callsite information, execution statistics and child nodes.
-
Profiler.ScriptCoverage
Coverage data for a JavaScript script.
- Profiler.SetSamplingIntervalParameterType
- Profiler.StartPreciseCoverageParameterType
- Profiler.StopReturnType
- Profiler.TakePreciseCoverageReturnType
- Runtime.AwaitPromiseParameterType
- Runtime.AwaitPromiseReturnType
-
Runtime.CallArgument
Represents function call argument. Either remote object id
objectId, primitivevalue, unserializable primitive value or neither of (for undefined) them should be specified. -
Runtime.CallFrame
Stack entry for runtime errors and assertions.
- Runtime.CallFunctionOnParameterType
- Runtime.CallFunctionOnReturnType
- Runtime.CompileScriptParameterType
- Runtime.CompileScriptReturnType
- Runtime.ConsoleAPICalledEventDataType
- Runtime.CustomPreview
- Runtime.EntryPreview
- Runtime.EvaluateParameterType
- Runtime.EvaluateReturnType
-
Runtime.ExceptionDetails
Detailed information about exception (or error) that was thrown during script compilation or execution.
- Runtime.ExceptionRevokedEventDataType
- Runtime.ExceptionThrownEventDataType
- Runtime.ExecutionContextCreatedEventDataType
-
Runtime.ExecutionContextDescription
Description of an isolated world.
- Runtime.ExecutionContextDestroyedEventDataType
- Runtime.GetPropertiesParameterType
- Runtime.GetPropertiesReturnType
- Runtime.GlobalLexicalScopeNamesParameterType
- Runtime.GlobalLexicalScopeNamesReturnType
- Runtime.InspectRequestedEventDataType
-
Runtime.InternalPropertyDescriptor
Object internal property descriptor. This property isn't normally visible in JavaScript code.
-
Runtime.ObjectPreview
Object containing abbreviated remote object value.
-
Runtime.PropertyDescriptor
Object property descriptor.
- Runtime.PropertyPreview
- Runtime.QueryObjectsParameterType
- Runtime.QueryObjectsReturnType
- Runtime.ReleaseObjectGroupParameterType
- Runtime.ReleaseObjectParameterType
-
Runtime.RemoteObject
Mirror object referencing original JavaScript object.
- Runtime.RunScriptParameterType
- Runtime.RunScriptReturnType
- Runtime.SetCustomObjectFormatterEnabledParameterType
-
Runtime.StackTrace
Call frames for assertions or error messages.
-
Runtime.StackTraceId
If
debuggerIdis set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. SeeRuntime.StackTraceandDebugger.pausedfor usages. -
Schema.Domain
Description of the protocol domain.
- Schema.GetDomainsReturnType
- Console
- Debugger
- HeapProfiler
- Network
- NodeRuntime
- NodeTracing
- NodeWorker
- Profiler
- Runtime
- Schema
-
Debugger.BreakpointId
Breakpoint identifier.
-
Debugger.CallFrameId
Call frame identifier.
-
HeapProfiler.HeapSnapshotObjectId
Heap snapshot object id.
-
Network.MonotonicTime
Monotonically increasing time in seconds since an arbitrary point in the past.
-
Network.RequestId
Unique request identifier.
-
Network.ResourceType
Resource type as it was perceived by the rendering engine.
-
Network.TimeSinceEpoch
UTC time in seconds, counted from January 1, 1970.
-
NodeWorker.SessionID
Unique identifier of attached debugging session.
- NodeWorker.WorkerID
-
Runtime.ExecutionContextId
Id of an execution context.
-
Runtime.RemoteObjectId
Unique object identifier.
-
Runtime.ScriptId
Unique script identifier.
-
Runtime.Timestamp
Number of milliseconds since epoch.
-
Runtime.UniqueDebuggerId
Unique identifier of current debugger.
-
Runtime.UnserializableValue
Primitive value which cannot be JSON-stringified.
-
console
An object to send messages to the remote inspector console.
node:module
- Module
- Module.SourceMap
- Module.createRequire
-
Module.enableCompileCache
Enable module compile cache in the current Node.js instance.
-
Module.findPackageJSON
// /path/to/project/packages/bar/bar.js import { findPackageJSON } from 'node:module'; findPackageJSON('..', import.meta.url); // '/path/to/project/package.json' // Same result when passing an absolute specifier instead: findPackageJSON(new URL('../', import.meta.url)); findPackageJSON(import.meta.resolve('../')); findPackageJSON('some-package', import.meta.url); // '/path/to/project/packages/bar/node_modules/some-package/package.json' // When passing an absolute specifier, you might get a different result if the // resolved module is inside a subfolder that has nested `package.json`. findPackageJSON(import.meta.resolve('some-package')); // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json' findPackageJSON('@foo/qux', import.meta.url); // '/path/to/project/packages/qux/package.json' -
Module.findSourceMap
pathis the resolved path for the file for which a corresponding source map should be fetched. -
Module.flushCompileCache
Flush the module compile cache accumulated from modules already loaded in the current Node.js instance to disk. This returns after all the flushing file system operations come to an end, no matter they succeed or not. If there are any errors, this will fail silently, since compile cache misses should not interfere with the actual operation of the application.
- Module.getCompileCacheDir
- Module.isBuiltin
-
Module.register
Register a module that exports hooks that customize Node.js module resolution and loading behavior. See Customization hooks.
- Module.runMain
-
Module.stripTypeScriptTypes
module.stripTypeScriptTypes()removes type annotations from TypeScript code. It can be used to strip type annotations from TypeScript code before running it withvm.runInContext()orvm.compileFunction(). By default, it will throw an error if the code contains TypeScript features that require transformation such asEnums, see type-stripping for more information. When mode is'transform', it also transforms TypeScript features to JavaScript, see transform TypeScript features for more information. When mode is'strip', source maps are not generated, because locations are preserved. IfsourceMapis provided, when mode is'strip', an error will be thrown. -
Module.syncBuiltinESMExports
The
module.syncBuiltinESMExports()method updates all the live bindings for builtinES Modulesto match the properties of theCommonJSexports. It does not add or remove exported names from theES Modules. - Module.wrap
- ImportMeta
- Module.EnableCompileCacheResult
- Module.ImportAttributes
- Module.LoadFnOutput
- Module.LoadHookContext
- Module.RegisterOptions
- Module.ResolveFnOutput
- Module.ResolveHookContext
- Module.SourceMapConstructorOptions
- Module.SourceMapPayload
- Module.SourceMapping
- Module.SourceOrigin
- Module.StripTypeScriptTypesOptions
- Require
- RequireResolve
- RequireResolveOptions
- NodeModule
- NodeRequire
- RequireExtensions
- Module.constants
-
Module.constants.compileCacheStatus
The following constants are returned as the
statusfield in the object returned by enableCompileCache to indicate the result of the attempt to enable the module compile cache. -
Module.InitializeHook
The
initializehook provides a way to define a custom function that runs in the hooks thread when the hooks module is initialized. Initialization happens when the hooks module is registered via register. -
Module.LoadHook
The
loadhook provides a way to define a custom method of determining how a URL should be interpreted, retrieved, and parsed. It is also in charge of validating the import attributes. - Module.ModuleFormat
- Module.ModuleSource
-
Module.ResolveHook
The
resolvehook chain is responsible for telling Node.js where to find and how to cache a givenimportstatement or expression, orrequirecall. It can optionally return a format (such as'module') as a hint to theloadhook. If a format is specified, theloadhook is ultimately responsible for providing the finalformatvalue (and it is free to ignore the hint provided byresolve); ifresolveprovides aformat, a customloadhook is required even if only to pass the value to the Node.js defaultloadhook. -
__dirname
The directory name of the current module. This is the same as the
path.dirname()of the__filename. -
__filename
The file name of the current module. This is the current module file's absolute path with symlinks resolved.
-
exports
The
exportsvariable is available within a module's file-level scope, and is assigned the value ofmodule.exportsbefore the module is evaluated. -
module
A reference to the current module.
-
Module.builtinModules
A list of the names of all modules provided by Node.js. Can be used to verify if a module is maintained by a third party or not.
-
Module.constants.compileCacheStatus.ALREADY_ENABLED
The compile cache has already been enabled before, either by a previous call to enableCompileCache, or by the
NODE_COMPILE_CACHE=direnvironment variable. The directory used to store the compile cache will be returned in thedirectoryfield in the returned object. -
Module.constants.compileCacheStatus.DISABLED
Node.js cannot enable the compile cache because the environment variable
NODE_DISABLE_COMPILE_CACHE=1has been set. -
Module.constants.compileCacheStatus.ENABLED
Node.js has enabled the compile cache successfully. The directory used to store the compile cache will be returned in the
directoryfield in the returned object. -
Module.constants.compileCacheStatus.FAILED
Node.js fails to enable the compile cache. This can be caused by the lack of permission to use the specified directory, or various kinds of file system errors. The detail of the failure will be returned in the
messagefield in the returned object. - require
node:net
-
BlockList
The
BlockListobject can be used with some network APIs to specify rules for disabling inbound or outbound access to specific IP addresses, IP ranges, or IP subnets. -
Server
This class is used to create a TCP or
IPCserver. - Socket
- SocketAddress
-
connect
Aliases to createConnection.
-
createConnection
A factory function, which creates a new Socket, immediately initiates connection with
socket.connect(), then returns thenet.Socketthat starts the connection. -
createServer
Creates a new TCP or
IPCserver. -
getDefaultAutoSelectFamily
Gets the current default value of the
autoSelectFamilyoption ofsocket.connect(options). The initial default value istrue, unless the command line option--no-network-family-autoselectionis provided. -
getDefaultAutoSelectFamilyAttemptTimeout
Gets the current default value of the
autoSelectFamilyAttemptTimeoutoption ofsocket.connect(options). The initial default value is250or the value specified via the command line option--network-family-autoselection-attempt-timeout. -
isIP
Returns
6ifinputis an IPv6 address. Returns4ifinputis an IPv4 address in dot-decimal notation with no leading zeroes. Otherwise, returns0. -
isIPv4
Returns
trueifinputis an IPv4 address in dot-decimal notation with no leading zeroes. Otherwise, returnsfalse. -
isIPv6
Returns
trueifinputis an IPv6 address. Otherwise, returnsfalse. -
setDefaultAutoSelectFamily
Sets the default value of the
autoSelectFamilyoption ofsocket.connect(options). -
setDefaultAutoSelectFamilyAttemptTimeout
Sets the default value of the
autoSelectFamilyAttemptTimeoutoption ofsocket.connect(options). - AddressInfo
- DropArgument
- IpcNetConnectOpts
- IpcSocketConnectOpts
- ListenOptions
- OnReadOpts
- ServerOpts
- SocketAddressInitOptions
- SocketConstructorOpts
- TcpNetConnectOpts
- TcpSocketConnectOpts
- ConnectOpts
- IPVersion
- LookupFunction
- NetConnectOpts
- SocketConnectOpts
- SocketReadyState
node:os
-
arch
Returns the operating system CPU architecture for which the Node.js binary was compiled. Possible values are
'arm','arm64','ia32','loong64','mips','mipsel','ppc','ppc64','riscv64','s390','s390x', and'x64'. -
availableParallelism
Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.
-
cpus
Returns an array of objects containing information about each logical CPU core. The array will be empty if no CPU information is available, such as if the
/procfile system is unavailable. -
endianness
Returns a string identifying the endianness of the CPU for which the Node.js binary was compiled.
-
freemem
Returns the amount of free system memory in bytes as an integer.
-
getPriority
Returns the scheduling priority for the process specified by
pid. Ifpidis not provided or is0, the priority of the current process is returned. -
homedir
Returns the string path of the current user's home directory.
-
hostname
Returns the host name of the operating system as a string.
-
loadavg
Returns an array containing the 1, 5, and 15 minute load averages.
-
machine
Returns the machine type as a string, such as
arm,arm64,aarch64,mips,mips64,ppc64,ppc64le,s390,s390x,i386,i686,x86_64. -
networkInterfaces
Returns an object containing network interfaces that have been assigned a network address.
-
platform
Returns a string identifying the operating system platform for which the Node.js binary was compiled. The value is set at compile time. Possible values are
'aix','darwin','freebsd','linux','openbsd','sunos', and'win32'. -
release
Returns the operating system as a string.
-
setPriority
Attempts to set the scheduling priority for the process specified by
pid. Ifpidis not provided or is0, the process ID of the current process is used. -
tmpdir
Returns the operating system's default directory for temporary files as a string.
-
totalmem
Returns the total amount of system memory in bytes as an integer.
-
type
Returns the operating system name as returned by
uname(3). For example, it returns'Linux'on Linux,'Darwin'on macOS, and'Windows_NT'on Windows. -
uptime
Returns the system uptime in number of seconds.
-
userInfo
Returns information about the currently effective user. On POSIX platforms, this is typically a subset of the password file. The returned object includes the
username,uid,gid,shell, andhomedir. On Windows, theuidandgidfields are-1, andshellisnull. -
version
Returns a string identifying the kernel version.
-
CpuInfo
The
node:osmodule provides operating system-related utility methods and properties. It can be accessed using: - NetworkInterfaceBase
- NetworkInterfaceInfoIPv4
- NetworkInterfaceInfoIPv6
- UserInfo
- constants
- constants.dlopen
- constants.errno
- constants.priority
- constants.signals
- NetworkInterfaceInfo
- SignalConstants
- constants.dlopen.RTLD_DEEPBIND
- constants.dlopen.RTLD_GLOBAL
- constants.dlopen.RTLD_LAZY
- constants.dlopen.RTLD_LOCAL
- constants.dlopen.RTLD_NOW
- constants.errno.E2BIG
- constants.errno.EACCES
- constants.errno.EADDRINUSE
- constants.errno.EADDRNOTAVAIL
- constants.errno.EAFNOSUPPORT
- constants.errno.EAGAIN
- constants.errno.EALREADY
- constants.errno.EBADF
- constants.errno.EBADMSG
- constants.errno.EBUSY
- constants.errno.ECANCELED
- constants.errno.ECHILD
- constants.errno.ECONNABORTED
- constants.errno.ECONNREFUSED
- constants.errno.ECONNRESET
- constants.errno.EDEADLK
- constants.errno.EDESTADDRREQ
- constants.errno.EDOM
- constants.errno.EDQUOT
- constants.errno.EEXIST
- constants.errno.EFAULT
- constants.errno.EFBIG
- constants.errno.EHOSTUNREACH
- constants.errno.EIDRM
- constants.errno.EILSEQ
- constants.errno.EINPROGRESS
- constants.errno.EINTR
- constants.errno.EINVAL
- constants.errno.EIO
- constants.errno.EISCONN
- constants.errno.EISDIR
- constants.errno.ELOOP
- constants.errno.EMFILE
- constants.errno.EMLINK
- constants.errno.EMSGSIZE
- constants.errno.EMULTIHOP
- constants.errno.ENAMETOOLONG
- constants.errno.ENETDOWN
- constants.errno.ENETRESET
- constants.errno.ENETUNREACH
- constants.errno.ENFILE
- constants.errno.ENOBUFS
- constants.errno.ENODATA
- constants.errno.ENODEV
- constants.errno.ENOENT
- constants.errno.ENOEXEC
- constants.errno.ENOLCK
- constants.errno.ENOLINK
- constants.errno.ENOMEM
- constants.errno.ENOMSG
- constants.errno.ENOPROTOOPT
- constants.errno.ENOSPC
- constants.errno.ENOSR
- constants.errno.ENOSTR
- constants.errno.ENOSYS
- constants.errno.ENOTCONN
- constants.errno.ENOTDIR
- constants.errno.ENOTEMPTY
- constants.errno.ENOTSOCK
- constants.errno.ENOTSUP
- constants.errno.ENOTTY
- constants.errno.ENXIO
- constants.errno.EOPNOTSUPP
- constants.errno.EOVERFLOW
- constants.errno.EPERM
- constants.errno.EPIPE
- constants.errno.EPROTO
- constants.errno.EPROTONOSUPPORT
- constants.errno.EPROTOTYPE
- constants.errno.ERANGE
- constants.errno.EROFS
- constants.errno.ESPIPE
- constants.errno.ESRCH
- constants.errno.ESTALE
- constants.errno.ETIME
- constants.errno.ETIMEDOUT
- constants.errno.ETXTBSY
- constants.errno.EWOULDBLOCK
- constants.errno.EXDEV
- constants.errno.WSA_E_CANCELLED
- constants.errno.WSA_E_NO_MORE
- constants.errno.WSAEACCES
- constants.errno.WSAEADDRINUSE
- constants.errno.WSAEADDRNOTAVAIL
- constants.errno.WSAEAFNOSUPPORT
- constants.errno.WSAEALREADY
- constants.errno.WSAEBADF
- constants.errno.WSAECANCELLED
- constants.errno.WSAECONNABORTED
- constants.errno.WSAECONNREFUSED
- constants.errno.WSAECONNRESET
- constants.errno.WSAEDESTADDRREQ
- constants.errno.WSAEDISCON
- constants.errno.WSAEDQUOT
- constants.errno.WSAEFAULT
- constants.errno.WSAEHOSTDOWN
- constants.errno.WSAEHOSTUNREACH
- constants.errno.WSAEINPROGRESS
- constants.errno.WSAEINTR
- constants.errno.WSAEINVAL
- constants.errno.WSAEINVALIDPROCTABLE
- constants.errno.WSAEINVALIDPROVIDER
- constants.errno.WSAEISCONN
- constants.errno.WSAELOOP
- constants.errno.WSAEMFILE
- constants.errno.WSAEMSGSIZE
- constants.errno.WSAENAMETOOLONG
- constants.errno.WSAENETDOWN
- constants.errno.WSAENETRESET
- constants.errno.WSAENETUNREACH
- constants.errno.WSAENOBUFS
- constants.errno.WSAENOMORE
- constants.errno.WSAENOPROTOOPT
- constants.errno.WSAENOTCONN
- constants.errno.WSAENOTEMPTY
- constants.errno.WSAENOTSOCK
- constants.errno.WSAEOPNOTSUPP
- constants.errno.WSAEPFNOSUPPORT
- constants.errno.WSAEPROCLIM
- constants.errno.WSAEPROTONOSUPPORT
- constants.errno.WSAEPROTOTYPE
- constants.errno.WSAEPROVIDERFAILEDINIT
- constants.errno.WSAEREFUSED
- constants.errno.WSAEREMOTE
- constants.errno.WSAESHUTDOWN
- constants.errno.WSAESOCKTNOSUPPORT
- constants.errno.WSAESTALE
- constants.errno.WSAETIMEDOUT
- constants.errno.WSAETOOMANYREFS
- constants.errno.WSAEUSERS
- constants.errno.WSAEWOULDBLOCK
- constants.errno.WSANOTINITIALISED
- constants.errno.WSASERVICE_NOT_FOUND
- constants.errno.WSASYSCALLFAILURE
- constants.errno.WSASYSNOTREADY
- constants.errno.WSATYPE_NOT_FOUND
- constants.errno.WSAVERNOTSUPPORTED
- constants.priority.PRIORITY_ABOVE_NORMAL
- constants.priority.PRIORITY_BELOW_NORMAL
- constants.priority.PRIORITY_HIGH
- constants.priority.PRIORITY_HIGHEST
- constants.priority.PRIORITY_LOW
- constants.priority.PRIORITY_NORMAL
- constants.UV_UDP_REUSEADDR
- devNull
-
EOL
The operating system-specific end-of-line marker.
node:path
- default.FormatInputPathObject
-
default.ParsedPath
A parsed path object generated by path.parse() or consumed by path.format().
- default.PlatformPath
- path.FormatInputPathObject
-
path.ParsedPath
A parsed path object generated by path.parse() or consumed by path.format().
- path.PlatformPath
-
default
The
node:pathmodule provides utilities for working with file and directory paths. It can be accessed using: -
path
The
node:pathmodule provides utilities for working with file and directory paths. It can be accessed using:
node:perf_hooks
-
PerformanceEntry
The constructor of this class is not exposed to users directly.
-
PerformanceMark
Exposes marks created via the
Performance.mark()method. -
PerformanceMeasure
Exposes measures created via the
Performance.measure()method. -
PerformanceNodeTiming
This property is an extension by Node.js. It is not available in Web browsers.
- PerformanceObserver
- PerformanceObserverEntryList
-
PerformanceResourceTiming
Provides detailed network timing data regarding the loading of an application's resources.
-
createHistogram
Returns a
RecordableHistogram. - monitorEventLoopDelay
- CreateHistogramOptions
- EventLoopMonitorOptions
- EventLoopUtilization
- Histogram
- IntervalHistogram
- MarkOptions
- MeasureOptions
- NodeGCPerformanceDetail
- Performance
- RecordableHistogram
- TimerifyOptions
- UVMetrics
- constants
- EntryType
- EventLoopUtilityFunction
- PerformanceObserverCallback
- constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE
- constants.NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY
- constants.NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED
- constants.NODE_PERFORMANCE_GC_FLAGS_FORCED
- constants.NODE_PERFORMANCE_GC_FLAGS_NO
- constants.NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE
- constants.NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING
- constants.NODE_PERFORMANCE_GC_INCREMENTAL
- constants.NODE_PERFORMANCE_GC_MAJOR
- constants.NODE_PERFORMANCE_GC_MINOR
- constants.NODE_PERFORMANCE_GC_WEAKCB
- performance
node:process
- CpuUsage
- EmitWarningOptions
- HRTime
- MemoryUsage
- MemoryUsageFn
- Process
- ProcessConfig
- ProcessEnv
- ProcessFeatures
- ProcessPermission
- ProcessRelease
- ProcessReport
- ProcessVersions
- ReadStream
- ResourceUsage
- Socket
- WriteStream
- Architecture
- BeforeExitListener
- DisconnectListener
- ExitListener
- MessageListener
- MultipleResolveListener
- MultipleResolveType
- Platform
- RejectionHandledListener
- Signals
- SignalsListener
- UncaughtExceptionListener
- UncaughtExceptionOrigin
-
UnhandledRejectionListener
Most of the time the unhandledRejection will be an Error, but this should not be relied upon as anything can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
- WarningListener
- WorkerListener
- process
node:punycode
-
decode
The
punycode.decode()method converts a Punycode string of ASCII-only characters to the equivalent string of Unicode codepoints. -
encode
The
punycode.encode()method converts a string of Unicode codepoints to a Punycode string of ASCII-only characters. -
toASCII
The
punycode.toASCII()method converts a Unicode string representing an Internationalized Domain Name to Punycode. Only the non-ASCII parts of the domain name will be converted. Callingpunycode.toASCII()on a string that already only contains ASCII characters will have no effect. - toUnicode
- ucs2
- version
node:querystring
-
escape
The
querystring.escape()method performs URL percent-encoding on the givenstrin a manner that is optimized for the specific requirements of URL query strings. -
parse
The
querystring.parse()method parses a URL query string (str) into a collection of key and value pairs. -
stringify
The
querystring.stringify()method produces a URL query string from a givenobjby iterating through the object's "own properties". -
unescape
The
querystring.unescape()method performs decoding of URL percent-encoded characters on the givenstr. - ParsedUrlQuery
- ParsedUrlQueryInput
- ParseOptions
-
StringifyOptions
The
node:querystringmodule provides utilities for parsing and formatting URL query strings. It can be accessed using: -
decode
The querystring.decode() function is an alias for querystring.parse().
-
encode
The querystring.encode() function is an alias for querystring.stringify().
node:readline
-
Interface
Instances of the
readline.Interfaceclass are constructed using thereadline.createInterface()method. Every instance is associated with a singleinputReadable stream and a singleoutputWritable stream. Theoutputstream is used to print prompts for user input that arrives on, and is read from, theinputstream. -
promises.Interface
Instances of the
readlinePromises.Interfaceclass are constructed using thereadlinePromises.createInterface()method. Every instance is associated with a singleinputReadablestream and a singleoutputWritablestream. Theoutputstream is used to print prompts for user input that arrives on, and is read from, theinputstream. - promises.Readline
-
clearLine
The
readline.clearLine()method clears current line of given TTY stream in a specified direction identified bydir. -
clearScreenDown
The
readline.clearScreenDown()method clears the given TTY stream from the current position of the cursor down. -
createInterface
The
readline.createInterface()method creates a newreadline.Interfaceinstance. -
cursorTo
The
readline.cursorTo()method moves cursor to the specified position in a given TTYstream. -
emitKeypressEvents
The
readline.emitKeypressEvents()method causes the givenReadablestream to begin emitting'keypress'events corresponding to received input. -
moveCursor
The
readline.moveCursor()method moves the cursor relative to its current position in a given TTYstream. -
promises.createInterface
The
readlinePromises.createInterface()method creates a newreadlinePromises.Interfaceinstance. - CursorPos
- Key
- promises.ReadLineOptions
- ReadLineOptions
- promises
- AsyncCompleter
- Completer
- CompleterResult
- Direction
- promises.Completer
- ReadLine
node:readline/promises
-
Interface
Instances of the
readlinePromises.Interfaceclass are constructed using thereadlinePromises.createInterface()method. Every instance is associated with a singleinputReadablestream and a singleoutputWritablestream. Theoutputstream is used to print prompts for user input that arrives on, and is read from, theinputstream. - Readline
-
createInterface
The
readlinePromises.createInterface()method creates a newreadlinePromises.Interfaceinstance. - ReadLineOptions
- Completer
node:repl
- Recoverable
- REPLServer
- start
- REPLCommand
- ReplOptions
- REPLCommandAction
- REPLEval
- REPLWriter
-
REPL_MODE_SLOPPY
A flag passed in the REPL options. Evaluates expressions in sloppy mode.
-
REPL_MODE_STRICT
A flag passed in the REPL options. Evaluates expressions in strict mode. This is equivalent to prefacing every repl statement with
'use strict'. -
writer
This is the default "writer" value, if none is passed in the REPL options, and it can be overridden by custom print functions.
node:sea
node:sqlite
-
DatabaseSync
This class represents a single connection to a SQLite database. All APIs exposed by this class execute synchronously.
-
StatementSync
This class represents a single prepared statement. This class cannot be instantiated via its constructor. Instead, instances are created via the
database.prepare()method. All APIs exposed by this class execute synchronously. - ApplyChangesetOptions
- CreateSessionOptions
- DatabaseSyncOptions
- FunctionOptions
- Session
- StatementResultingChanges
- constants
- SQLInputValue
- SQLOutputValue
- SupportedValueType
-
constants.SQLITE_CHANGESET_ABORT
Abort when a change encounters a conflict and roll back database.
-
constants.SQLITE_CHANGESET_CONFLICT
This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values.
-
constants.SQLITE_CHANGESET_DATA
The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values.
-
constants.SQLITE_CHANGESET_FOREIGN_KEY
If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns
SQLITE_CHANGESET_OMIT, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returnsSQLITE_CHANGESET_ABORT, the changeset is rolled back. -
constants.SQLITE_CHANGESET_NOTFOUND
The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database.
-
constants.SQLITE_CHANGESET_OMIT
Conflicting changes are omitted.
-
constants.SQLITE_CHANGESET_REPLACE
Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either
SQLITE_CHANGESET_DATAorSQLITE_CHANGESET_CONFLICT.
node:stream
- default
-
default.Duplex
Duplex streams are streams that implement both the
ReadableandWritableinterfaces. -
default.PassThrough
The
stream.PassThroughclass is a trivial implementation of aTransformstream that simply passes the input bytes across to the output. Its purpose is primarily for examples and testing, but there are some use cases wherestream.PassThroughis useful as a building block for novel sorts of streams. - default.Readable
-
default.Transform
Transform streams are
Duplexstreams where the output is in some way related to the input. Like allDuplexstreams,Transformstreams implement both theReadableandWritableinterfaces. - default.Writable
- Stream
-
Stream.Duplex
Duplex streams are streams that implement both the
ReadableandWritableinterfaces. -
Stream.PassThrough
The
stream.PassThroughclass is a trivial implementation of aTransformstream that simply passes the input bytes across to the output. Its purpose is primarily for examples and testing, but there are some use cases wherestream.PassThroughis useful as a building block for novel sorts of streams. - Stream.Readable
-
Stream.Transform
Transform streams are
Duplexstreams where the output is in some way related to the input. Like allDuplexstreams,Transformstreams implement both theReadableandWritableinterfaces. - Stream.Writable
-
default.addAbortSignal
A stream to attach a signal to.
-
default.duplexPair
The utility function
duplexPairreturns an Array with two items, each being aDuplexstream connected to the other side: -
default.finished
A readable and/or writable stream/webstream.
- default.finished.__promisify__
-
default.getDefaultHighWaterMark
Returns the default highWaterMark used by streams. Defaults to
65536(64 KiB), or16forobjectMode. -
default.isErrored
Returns whether the stream has encountered an error.
-
default.isReadable
Returns whether the stream is readable.
-
default.pipeline
A module method to pipe between streams and generators forwarding errors and properly cleaning up and provide a callback when the pipeline is complete.
- default.pipeline.__promisify__
-
default.setDefaultHighWaterMark
Sets the default highWaterMark used by streams.
-
Stream.addAbortSignal
A stream to attach a signal to.
-
Stream.duplexPair
The utility function
duplexPairreturns an Array with two items, each being aDuplexstream connected to the other side: -
Stream.finished
A readable and/or writable stream/webstream.
- Stream.finished.__promisify__
-
Stream.getDefaultHighWaterMark
Returns the default highWaterMark used by streams. Defaults to
65536(64 KiB), or16forobjectMode. -
Stream.isErrored
Returns whether the stream has encountered an error.
-
Stream.isReadable
Returns whether the stream is readable.
-
Stream.pipeline
A module method to pipe between streams and generators forwarding errors and properly cleaning up and provide a callback when the pipeline is complete.
- Stream.pipeline.__promisify__
-
Stream.setDefaultHighWaterMark
Sets the default highWaterMark used by streams.
- default.ArrayOptions
- default.DuplexOptions
- default.FinishedOptions
- default.Pipe
- default.PipelineOptions
- default.ReadableOptions
- default.StreamOptions
- default.TransformOptions
- default.WritableOptions
- Stream.ArrayOptions
- Stream.DuplexOptions
- Stream.FinishedOptions
- Stream.Pipe
- Stream.PipelineOptions
- Stream.ReadableOptions
- Stream.StreamOptions
- Stream.TransformOptions
- Stream.WritableOptions
- ComposeFnParam
- default.PipelineCallback
- default.PipelineDestination
- default.PipelineDestinationIterableFunction
- default.PipelineDestinationPromiseFunction
- default.PipelinePromise
- default.PipelineSource
- default.PipelineSourceFunction
- default.PipelineTransform
- default.PipelineTransformSource
- default.TransformCallback
- Stream.PipelineCallback
- Stream.PipelineDestination
- Stream.PipelineDestinationIterableFunction
- Stream.PipelineDestinationPromiseFunction
- Stream.PipelinePromise
- Stream.PipelineSource
- Stream.PipelineSourceFunction
- Stream.PipelineTransform
- Stream.PipelineTransformSource
- Stream.TransformCallback
node:stream/consumers
node:stream/promises
node:stream/web
-
ByteLengthQueuingStrategy
This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
- CompressionStream
-
CountQueuingStrategy
This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
- DecompressionStream
- QueuingStrategy
- QueuingStrategyInit
- QueuingStrategySize
- ReadableByteStreamController
- ReadableByteStreamControllerCallback
-
ReadableStream
This Streams API interface represents a readable stream of byte data.
- ReadableStreamAsyncIterator
- ReadableStreamBYOBReader
- ReadableStreamBYOBRequest
- ReadableStreamDefaultController
- ReadableStreamDefaultReader
- ReadableStreamErrorCallback
- ReadableStreamGenericReader
- ReadableStreamGetReaderOptions
- ReadableStreamReadDoneResult
- ReadableStreamReadValueResult
- ReadableWritablePair
- StreamPipeOptions
- TextDecoderOptions
- TextDecoderStream
- TextEncoderStream
- Transformer
- TransformerFlushCallback
- TransformerStartCallback
- TransformerTransformCallback
- TransformStream
- TransformStreamDefaultController
- UnderlyingByteSource
- UnderlyingSink
- UnderlyingSinkAbortCallback
- UnderlyingSinkCloseCallback
- UnderlyingSinkStartCallback
- UnderlyingSinkWriteCallback
- UnderlyingSource
- UnderlyingSourceCancelCallback
- UnderlyingSourcePullCallback
- UnderlyingSourceStartCallback
-
WritableStream
This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in back pressure and queuing.
-
WritableStreamDefaultController
This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
-
WritableStreamDefaultWriter
This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink.
- BufferSource
- ReadableStreamController
- ReadableStreamReader
- ReadableStreamReaderMode
- ReadableStreamReadResult
node:string_decoder
-
StringDecoder
The
node:string_decodermodule provides an API for decodingBufferobjects into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 characters. It can be accessed using:
node:test
-
MockFunctionContext
The
MockFunctionContextclass is used to inspect or manipulate the behavior of mocks created via theMockTrackerAPIs. - MockModuleContext
-
MockTimers
Mocking timers is a technique commonly used in software testing to simulate and control the behavior of timers, such as
setIntervalandsetTimeout, without actually waiting for the specified time intervals. -
MockTracker
The
MockTrackerclass is used to manage mocking functionality. The test runner module provides a top levelmockexport which is aMockTrackerinstance. Each test also provides its ownMockTrackerinstance via the test context'smockproperty. -
SuiteContext
An instance of
SuiteContextis passed to each suite function in order to interact with the test runner. However, theSuiteContextconstructor is not exposed as part of the API. -
TestContext
An instance of
TestContextis passed to each test function in order to interact with the test runner. However, theTestContextconstructor is not exposed as part of the API. -
TestsStream
A successful call to
run()will return a newTestsStreamobject, streaming a series of events representing the execution of the tests. -
after
This function creates a hook that runs after executing a suite.
-
afterEach
This function creates a hook that runs after each test in the current suite. The
afterEach()hook is run even if the test fails. -
assert.register
Defines a new assertion function with the provided name and function. If an assertion already exists with the same name, it is overwritten.
-
before
This function creates a hook that runs before executing a suite.
-
beforeEach
This function creates a hook that runs before each test in the current suite.
-
default
The
test()function is the value imported from thetestmodule. Each invocation of this function results in reporting the test to theTestsStream. -
default.after
This function creates a hook that runs after executing a suite.
-
default.afterEach
This function creates a hook that runs after each test in the current suite. The
afterEach()hook is run even if the test fails. -
default.assert.register
Defines a new assertion function with the provided name and function. If an assertion already exists with the same name, it is overwritten.
-
default.before
This function creates a hook that runs before executing a suite.
-
default.beforeEach
This function creates a hook that runs before each test in the current suite.
-
default.describe
Alias for suite.
-
default.describe.only
Shorthand for marking a suite as
only. This is the same as calling describe withoptions.onlyset totrue. -
default.describe.skip
Shorthand for skipping a suite. This is the same as calling describe with
options.skipset totrue. -
default.describe.todo
Shorthand for marking a suite as
TODO. This is the same as calling describe withoptions.todoset totrue. -
default.it
Alias for test.
-
default.it.only
Shorthand for marking a test as
only. This is the same as calling it withoptions.onlyset totrue. -
default.it.skip
Shorthand for skipping a test. This is the same as calling it with
options.skipset totrue. -
default.it.todo
Shorthand for marking a test as
TODO. This is the same as calling it withoptions.todoset totrue. -
default.only
Shorthand for marking a test as
only. This is the same as calling test withoptions.onlyset totrue. -
default.run
Note:
shardis used to horizontally parallelize test running across machines or processes, ideal for large-scale executions across varied environments. It's incompatible withwatchmode, tailored for rapid code iteration by automatically rerunning tests on file changes. -
default.skip
Shorthand for skipping a test. This is the same as calling test with
options.skipset totrue. -
default.snapshot.setDefaultSnapshotSerializers
This function is used to customize the default serialization mechanism used by the test runner.
-
default.snapshot.setResolveSnapshotPath
This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. By default, the snapshot filename is the same as the entry point filename with
.snapshotappended. -
default.suite
The
suite()function is imported from thenode:testmodule. -
default.suite.only
Shorthand for marking a suite as
only. This is the same as calling suite withoptions.onlyset totrue. -
default.suite.skip
Shorthand for skipping a suite. This is the same as calling suite with
options.skipset totrue. -
default.suite.todo
Shorthand for marking a suite as
TODO. This is the same as calling suite withoptions.todoset totrue. -
default.todo
Shorthand for marking a test as
TODO. This is the same as calling test withoptions.todoset totrue. -
describe
Alias for suite.
-
describe.only
Shorthand for marking a suite as
only. This is the same as calling describe withoptions.onlyset totrue. -
describe.skip
Shorthand for skipping a suite. This is the same as calling describe with
options.skipset totrue. -
describe.todo
Shorthand for marking a suite as
TODO. This is the same as calling describe withoptions.todoset totrue. -
it
Alias for test.
-
it.only
Shorthand for marking a test as
only. This is the same as calling it withoptions.onlyset totrue. -
it.skip
Shorthand for skipping a test. This is the same as calling it with
options.skipset totrue. -
it.todo
Shorthand for marking a test as
TODO. This is the same as calling it withoptions.todoset totrue. -
only
Shorthand for marking a test as
only. This is the same as calling test withoptions.onlyset totrue. -
run
Note:
shardis used to horizontally parallelize test running across machines or processes, ideal for large-scale executions across varied environments. It's incompatible withwatchmode, tailored for rapid code iteration by automatically rerunning tests on file changes. -
skip
Shorthand for skipping a test. This is the same as calling test with
options.skipset totrue. -
snapshot.setDefaultSnapshotSerializers
This function is used to customize the default serialization mechanism used by the test runner.
-
snapshot.setResolveSnapshotPath
This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. By default, the snapshot filename is the same as the entry point filename with
.snapshotappended. -
suite
The
suite()function is imported from thenode:testmodule. -
suite.only
Shorthand for marking a suite as
only. This is the same as calling suite withoptions.onlyset totrue. -
suite.skip
Shorthand for skipping a suite. This is the same as calling suite with
options.skipset totrue. -
suite.todo
Shorthand for marking a suite as
TODO. This is the same as calling suite withoptions.todoset totrue. -
test
The
test()function is the value imported from thetestmodule. Each invocation of this function results in reporting the test to theTestsStream. -
test.after
This function creates a hook that runs after executing a suite.
-
test.afterEach
This function creates a hook that runs after each test in the current suite. The
afterEach()hook is run even if the test fails. -
test.assert.register
Defines a new assertion function with the provided name and function. If an assertion already exists with the same name, it is overwritten.
-
test.before
This function creates a hook that runs before executing a suite.
-
test.beforeEach
This function creates a hook that runs before each test in the current suite.
-
test.describe
Alias for suite.
-
test.describe.only
Shorthand for marking a suite as
only. This is the same as calling describe withoptions.onlyset totrue. -
test.describe.skip
Shorthand for skipping a suite. This is the same as calling describe with
options.skipset totrue. -
test.describe.todo
Shorthand for marking a suite as
TODO. This is the same as calling describe withoptions.todoset totrue. -
test.it
Alias for test.
-
test.it.only
Shorthand for marking a test as
only. This is the same as calling it withoptions.onlyset totrue. -
test.it.skip
Shorthand for skipping a test. This is the same as calling it with
options.skipset totrue. -
test.it.todo
Shorthand for marking a test as
TODO. This is the same as calling it withoptions.todoset totrue. -
test.only
Shorthand for marking a test as
only. This is the same as calling test withoptions.onlyset totrue. -
test.run
Note:
shardis used to horizontally parallelize test running across machines or processes, ideal for large-scale executions across varied environments. It's incompatible withwatchmode, tailored for rapid code iteration by automatically rerunning tests on file changes. -
test.skip
Shorthand for skipping a test. This is the same as calling test with
options.skipset totrue. -
test.snapshot.setDefaultSnapshotSerializers
This function is used to customize the default serialization mechanism used by the test runner.
-
test.snapshot.setResolveSnapshotPath
This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. By default, the snapshot filename is the same as the entry point filename with
.snapshotappended. -
test.suite
The
suite()function is imported from thenode:testmodule. -
test.suite.only
Shorthand for marking a suite as
only. This is the same as calling suite withoptions.onlyset totrue. -
test.suite.skip
Shorthand for skipping a suite. This is the same as calling suite with
options.skipset totrue. -
test.suite.todo
Shorthand for marking a suite as
TODO. This is the same as calling suite withoptions.todoset totrue. -
test.todo
Shorthand for marking a test as
TODO. This is the same as calling test withoptions.todoset totrue. -
todo
Shorthand for marking a test as
TODO. This is the same as calling test withoptions.todoset totrue. - AssertSnapshotOptions
-
HookOptions
Configuration options for hooks.
- MockFunctionCall
- MockFunctionOptions
- MockMethodOptions
- MockModuleOptions
- MockTimersOptions
- RunOptions
- TestContextAssert
- TestContextWaitForOptions
- TestOptions
- TestShard
-
assert
An object whose methods are used to configure available assertions on the
TestContextobjects in the current process. The methods fromnode:assertand snapshot testing functions are available by default. -
default.assert
An object whose methods are used to configure available assertions on the
TestContextobjects in the current process. The methods fromnode:assertand snapshot testing functions are available by default. - default.snapshot
- snapshot
-
test.assert
An object whose methods are used to configure available assertions on the
TestContextobjects in the current process. The methods fromnode:assertand snapshot testing functions are available by default. - test.snapshot
- FunctionPropertyNames
-
HookFn
The hook function. The first argument is the context in which the hook is called. If the hook uses callbacks, the callback function is passed as the second argument.
- Mock
- NoOpFunction
-
SuiteFn
The type of a suite test function. The argument to this function is a SuiteContext object.
-
TestContextHookFn
The hook function. The first argument is a
TestContextobject. If the hook uses callbacks, the callback function is passed as the second argument. -
TestFn
The type of a function passed to test. The first argument to this function is a TestContext object. If the test uses callbacks, the callback function is passed as the second argument.
- Timer
- default.mock
- mock
- test.mock
node:test/reporters
- LcovReporter
- SpecReporter
-
dot
The
dotreporter outputs the test results in a compact format, where each passing test is represented by a., and each failing test is represented by aX. -
junit
The
junitreporter outputs test results in a jUnit XML format. -
tap
The
tapreporter outputs the test results in the TAP format. - ReporterConstructorWrapper
- TestEvent
- TestEventGenerator
-
lcov
The
lcovreporter outputs test coverage when used with the--experimental-test-coverageflag. -
spec
The
specreporter outputs the test results in a human-readable format.
node:timers
-
clearImmediate
Cancels an
Immediateobject created bysetImmediate(). -
clearInterval
Cancels a
Timeoutobject created bysetInterval(). -
clearTimeout
Cancels a
Timeoutobject created bysetTimeout(). - promises.setImmediate
-
promises.setInterval
Returns an async iterator that generates values in an interval of
delayms. Ifrefistrue, you need to callnext()of async iterator explicitly or implicitly to keep the event loop alive. - promises.setTimeout
-
queueMicrotask
The
queueMicrotask()method queues a microtask to invokecallback. Ifcallbackthrows an exception, theprocessobject'uncaughtException'event will be emitted. -
setImmediate
Schedules the "immediate" execution of the
callbackafter I/O events' callbacks. - setImmediate.setImmediate
-
setInterval
Schedules repeated execution of
callbackeverydelaymilliseconds. -
setTimeout
Schedules execution of a one-time
callbackafterdelaymilliseconds. - setTimeout.setTimeout
-
Immediate
This object is created internally and is returned from
setImmediate(). It can be passed toclearImmediate()in order to cancel the scheduled actions. - promises.Scheduler
-
Timeout
This object is created internally and is returned from
setTimeout()andsetInterval(). It can be passed to eitherclearTimeout()orclearInterval()in order to cancel the scheduled actions. - TimerOptions
- Timer
-
promises
The
timers/promisesAPI provides an alternative set of timer functions that returnPromiseobjects. The API is accessible viarequire('node:timers/promises'). - promises.scheduler
node:timers/promises
- setImmediate
-
setInterval
Returns an async iterator that generates values in an interval of
delayms. Ifrefistrue, you need to callnext()of async iterator explicitly or implicitly to keep the event loop alive. - setTimeout
- Scheduler
- scheduler
node:tls
-
Server
Accepts encrypted connections using TLS or SSL.
-
TLSSocket
Performs transparent encryption of written data and all required TLS negotiation.
-
checkServerIdentity
Verifies the certificate
certis issued tohostname. -
connect
The
callbackfunction, if specified, will be added as a listener for the'secureConnect'event. -
createSecureContext
[createServer](/api/node/tls/sets the default value of thehonorCipherOrderoption totrue, other APIs that create secure contexts leave it unset. -
createServer
Creates a new Server. The
secureConnectionListener, if provided, is automatically set as a listener for the'secureConnection'event. -
getCiphers
Returns an array with the names of the supported TLS ciphers. The names are lower-case for historical reasons, but must be uppercased to be used in the
ciphersoption of[createSecureContext](/api/node/tls/. - createSecurePair
- Certificate
- CipherNameAndProtocol
- CommonConnectionOptions
- ConnectionOptions
- DetailedPeerCertificate
- EphemeralKeyInfo
- KeyObject
- PeerCertificate
- PSKCallbackNegotation
- PxfObject
- SecureContext
- SecureContextOptions
- TlsOptions
- TLSSocketOptions
- SecurePair
- SecureVersion
- CLIENT_RENEG_LIMIT
- CLIENT_RENEG_WINDOW
-
DEFAULT_CIPHERS
The default value of the
ciphersoption ofcreateSecureContext(). It can be assigned any of the supported OpenSSL ciphers. Defaults to the content ofcrypto.constants.defaultCoreCipherList, unless changed using CLI options using--tls-default-ciphers. -
DEFAULT_ECDH_CURVE
The default curve name to use for ECDH key agreement in a tls server. The default value is
'auto'. SeecreateSecureContext()for further information. -
DEFAULT_MAX_VERSION
The default value of the
maxVersionoption ofcreateSecureContext(). It can be assigned any of the supported TLS protocol versions,'TLSv1.3','TLSv1.2','TLSv1.1', or'TLSv1'. Default:'TLSv1.3', unless changed using CLI options. Using--tls-max-v1.2sets the default to'TLSv1.2'. Using--tls-max-v1.3sets the default to'TLSv1.3'. If multiple of the options are provided, the highest maximum is used. -
DEFAULT_MIN_VERSION
The default value of the
minVersionoption ofcreateSecureContext(). It can be assigned any of the supported TLS protocol versions,'TLSv1.3','TLSv1.2','TLSv1.1', or'TLSv1'. Default:'TLSv1.2', unless changed using CLI options. Using--tls-min-v1.0sets the default to'TLSv1'. Using--tls-min-v1.1sets the default to'TLSv1.1'. Using--tls-min-v1.3sets the default to'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. -
rootCertificates
An immutable array of strings representing the root certificates (in PEM format) from the bundled Mozilla CA store as supplied by the current Node.js version.
node:trace_events
node:tty
-
ReadStream
Represents the readable side of a TTY. In normal circumstances
process.stdinwill be the onlytty.ReadStreaminstance in a Node.js process and there should be no reason to create additional instances. -
WriteStream
Represents the writable side of a TTY. In normal circumstances,
process.stdoutandprocess.stderrwill be the onlytty.WriteStreaminstances created for a Node.js process and there should be no reason to create additional instances. -
isatty
The
tty.isatty()method returnstrueif the givenfdis associated with a TTY andfalseif it is not, including wheneverfdis not a non-negative integer. -
Direction
-1 - to the left from cursor 0 - the entire line 1 - to the right from cursor
node:url
-
URL
Browser-compatible
URLclass, implemented by following the WHATWG URL Standard. Examples of parsed URLs may be found in the Standard itself. TheURLclass is also available on the global object. -
URLSearchParams
The
URLSearchParamsAPI provides read and write access to the query of aURL. TheURLSearchParamsclass can also be used standalone with one of the four following constructors. TheURLSearchParamsclass is also available on the global object. -
domainToASCII
Returns the Punycode ASCII serialization of the
domain. Ifdomainis an invalid domain, the empty string is returned. -
domainToUnicode
Returns the Unicode serialization of the
domain. Ifdomainis an invalid domain, the empty string is returned. -
fileURLToPath
This function ensures the correct decodings of percent-encoded characters as well as ensuring a cross-platform valid absolute path string.
-
format
The
url.format()method returns a formatted URL string derived fromurlObject. - parse
-
pathToFileURL
This function ensures that
pathis resolved absolutely, and that the URL control characters are correctly encoded when converting into a File URL. -
resolve
The
url.resolve()method resolves a target URL relative to a base URL in a manner similar to that of a web browser resolving an anchor tag. -
urlToHttpOptions
This utility function converts a URL object into an ordinary options object as expected by the
http.request()andhttps.request()APIs. - FileUrlToPathOptions
- Global
- PathToFileUrlOptions
- Url
- URLFormatOptions
- UrlObject
- URLSearchParamsIterator
- UrlWithParsedQuery
- UrlWithStringQuery
node:util
- MIMEParams
- MIMEType
-
TextDecoder
An implementation of the WHATWG Encoding Standard
TextDecoderAPI. -
TextEncoder
An implementation of the WHATWG Encoding Standard
TextEncoderAPI. All instances ofTextEncoderonly support UTF-8 encoding. -
aborted
Listens to abort event on the provided
signaland returns a promise that resolves when thesignalis aborted. Ifresourceis provided, it weakly references the operation's associated object, so ifresourceis garbage collected before thesignalaborts, then returned promise shall remain pending. This prevents memory leaks in long-running or non-cancelable operations. -
callbackify
Takes an
asyncfunction (or a function that returns aPromise) and returns a function following the error-first callback style, i.e. taking an(err, value) => ...callback as the last argument. In the callback, the first argument will be the rejection reason (ornullif thePromiseresolved), and the second argument will be the resolved value. -
debuglog
The
util.debuglog()method is used to create a function that conditionally writes debug messages tostderrbased on the existence of theNODE_DEBUGenvironment variable. If thesectionname appears within the value of that environment variable, then the returned function operates similar toconsole.error(). If not, then the returned function is a no-op. -
deprecate
The
util.deprecate()method wrapsfn(which may be a function or class) in such a way that it is marked as deprecated. -
format
The
util.format()method returns a formatted string using the first argument as aprintf-like format string which can contain zero or more format specifiers. Each specifier is replaced with the converted value from the corresponding argument. Supported specifiers are: - formatWithOptions
-
getCallSites
Returns an array of call site objects containing the stack of the caller function.
- getSystemErrorMap
-
getSystemErrorMessage
Returns the string message for a numeric error code that comes from a Node.js API. The mapping between error codes and string messages is platform-dependent.
-
getSystemErrorName
Returns the string name for a numeric error code that comes from a Node.js API. The mapping between error codes and error names is platform-dependent. See
Common System Errorsfor the names of common errors. -
inherits
Usage of
util.inherits()is discouraged. Please use the ES6classandextendskeywords to get language level inheritance support. Also note that the two styles are semantically incompatible. -
inspect
The
util.inspect()method returns a string representation ofobjectthat is intended for debugging. The output ofutil.inspectmay change at any time and should not be depended upon programmatically. Additionaloptionsmay be passed that alter the result.util.inspect()will use the constructor's name and/or@@toStringTagto make an identifiable tag for an inspected value. -
isDeepStrictEqual
Returns
trueif there is deep strict equality betweenval1andval2. Otherwise, returnsfalse. -
parseArgs
Provides a higher level API for command-line argument parsing than interacting with
process.argvdirectly. Takes a specification for the expected arguments and returns a structured object with the parsed options and positionals. -
parseEnv
Stability: 1.1 - Active development Given an example
.envfile: -
promisify
Takes a function following the common error-first callback style, i.e. taking an
(err, value) => ...callback as the last argument, and returns a version that returns promises. -
stripVTControlCharacters
Returns
strwith any ANSI escape codes removed. -
styleText
This function returns a formatted text considering the
formatpassed. -
toUSVString
Returns the
stringafter replacing any surrogate code points (or equivalently, any unpaired surrogate code units) with the Unicode "replacement character" U+FFFD. - transferableAbortController
- transferableAbortSignal
-
types.isAnyArrayBuffer
Returns
trueif the value is a built-inArrayBufferorSharedArrayBufferinstance. -
types.isArgumentsObject
Returns
trueif the value is anargumentsobject. -
types.isArrayBuffer
Returns
trueif the value is a built-inArrayBufferinstance. This does not includeSharedArrayBufferinstances. Usually, it is desirable to test for both; Seeutil.types.isAnyArrayBuffer()for that. -
types.isArrayBufferView
Returns
trueif the value is an instance of one of theArrayBufferviews, such as typed array objects orDataView. Equivalent toArrayBuffer.isView(). -
types.isAsyncFunction
Returns
trueif 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. -
types.isBigInt64Array
Returns
trueif the value is aBigInt64Arrayinstance. -
types.isBigIntObject
Returns
trueif the value is a BigInt object, e.g. created byObject(BigInt(123)). -
types.isBigUint64Array
Returns
trueif the value is aBigUint64Arrayinstance. -
types.isBooleanObject
Returns
trueif the value is a boolean object, e.g. created bynew Boolean(). -
types.isBoxedPrimitive
Returns
trueif the value is any boxed primitive object, e.g. created bynew Boolean(),new String()orObject(Symbol()). -
types.isCryptoKey
Returns
trueifvalueis aCryptoKey,falseotherwise. -
types.isDataView
Returns
trueif the value is a built-inDataViewinstance. -
types.isDate
Returns
trueif the value is a built-inDateinstance. -
types.isExternal
Returns
trueif the value is a nativeExternalvalue. -
types.isFloat32Array
Returns
trueif the value is a built-inFloat32Arrayinstance. -
types.isFloat64Array
Returns
trueif the value is a built-inFloat64Arrayinstance. -
types.isGeneratorFunction
Returns
trueif 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. -
types.isGeneratorObject
Returns
trueif 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. -
types.isInt16Array
Returns
trueif the value is a built-inInt16Arrayinstance. -
types.isInt32Array
Returns
trueif the value is a built-inInt32Arrayinstance. -
types.isInt8Array
Returns
trueif the value is a built-inInt8Arrayinstance. -
types.isKeyObject
Returns
trueifvalueis aKeyObject,falseotherwise. -
types.isMap
Returns
trueif the value is a built-inMapinstance. -
types.isMapIterator
Returns
trueif the value is an iterator returned for a built-inMapinstance. -
types.isModuleNamespaceObject
Returns
trueif the value is an instance of a Module Namespace Object. -
types.isNativeError
Returns
trueif the value was returned by the constructor of a built-inErrortype. -
types.isNumberObject
Returns
trueif the value is a number object, e.g. created bynew Number(). -
types.isPromise
Returns
trueif the value is a built-inPromise. -
types.isProxy
Returns
trueif the value is aProxyinstance. -
types.isRegExp
Returns
trueif the value is a regular expression object. -
types.isSet
Returns
trueif the value is a built-inSetinstance. -
types.isSetIterator
Returns
trueif the value is an iterator returned for a built-inSetinstance. -
types.isSharedArrayBuffer
Returns
trueif the value is a built-inSharedArrayBufferinstance. This does not includeArrayBufferinstances. Usually, it is desirable to test for both; Seeutil.types.isAnyArrayBuffer()for that. -
types.isStringObject
Returns
trueif the value is a string object, e.g. created bynew String(). -
types.isSymbolObject
Returns
trueif the value is a symbol object, created by callingObject()on aSymbolprimitive. -
types.isTypedArray
Returns
trueif the value is a built-inTypedArrayinstance. -
types.isUint16Array
Returns
trueif the value is a built-inUint16Arrayinstance. -
types.isUint32Array
Returns
trueif the value is a built-inUint32Arrayinstance. -
types.isUint8Array
Returns
trueif the value is a built-inUint8Arrayinstance. -
types.isUint8ClampedArray
Returns
trueif the value is a built-inUint8ClampedArrayinstance. -
types.isWeakMap
Returns
trueif the value is a built-inWeakMapinstance. -
types.isWeakSet
Returns
trueif the value is a built-inWeakSetinstance. -
isArray
Alias for
Array.isArray(). -
isBoolean
Returns
trueif the givenobjectis aBoolean. Otherwise, returnsfalse. -
isBuffer
Returns
trueif the givenobjectis aBuffer. Otherwise, returnsfalse. -
isDate
Returns
trueif the givenobjectis aDate. Otherwise, returnsfalse. -
isError
Returns
trueif the givenobjectis anError. Otherwise, returnsfalse. -
isFunction
Returns
trueif the givenobjectis aFunction. Otherwise, returnsfalse. -
isNull
Returns
trueif the givenobjectis strictlynull. Otherwise, returnsfalse. -
isNullOrUndefined
Returns
trueif the givenobjectisnullorundefined. Otherwise, returnsfalse. -
isNumber
Returns
trueif the givenobjectis aNumber. Otherwise, returnsfalse. -
isObject
Returns
trueif the givenobjectis strictly anObjectand not aFunction(even though functions are objects in JavaScript). Otherwise, returnsfalse. -
isPrimitive
Returns
trueif the givenobjectis a primitive type. Otherwise, returnsfalse. -
isRegExp
Returns
trueif the givenobjectis aRegExp. Otherwise, returnsfalse. -
isString
Returns
trueif the givenobjectis astring. Otherwise, returnsfalse. -
isSymbol
Returns
trueif the givenobjectis aSymbol. Otherwise, returnsfalse. -
isUndefined
Returns
trueif the givenobjectisundefined. Otherwise, returnsfalse. -
log
The
util.log()method prints the givenstringtostdoutwith an included timestamp. - CallSiteObject
- CustomPromisifyLegacy
- CustomPromisifySymbol
- DebugLogger
- EncodeIntoResult
- GetCallSitesOptions
- InspectOptions
- InspectOptionsStylized
- ParseArgsConfig
- ParseArgsOptionDescriptor
- ParseArgsOptionsConfig
- types
- ApplyOptionalModifiers
- BackgroundColors
- CustomInspectFunction
- CustomPromisify
- DebugLoggerFunction
- ExtractOptionValue
- ForegroundColors
- IfDefaultsFalse
- IfDefaultsTrue
- Modifiers
- OptionToken
-
ParseArgsOptionsType
Type of argument used in parseArgs.
- ParsedOptionToken
- ParsedPositionals
- ParsedPositionalToken
- ParsedResults
- ParsedTokens
- ParsedValues
- PreciseParsedResults
- PreciseTokenForOptions
- Style
- Token
- TokenForOptions
- debug
- inspect.colors
-
inspect.custom
That can be used to declare custom inspect functions.
- inspect.defaultOptions
-
inspect.replDefaults
Allows changing inspect settings from the repl.
- inspect.styles
-
promisify.custom
That can be used to declare custom promisified variants of functions.
node:util/types
-
isAnyArrayBuffer
Returns
trueif the value is a built-inArrayBufferorSharedArrayBufferinstance. -
isArgumentsObject
Returns
trueif the value is anargumentsobject. -
isArrayBuffer
Returns
trueif the value is a built-inArrayBufferinstance. This does not includeSharedArrayBufferinstances. Usually, it is desirable to test for both; Seeutil.types.isAnyArrayBuffer()for that. -
isArrayBufferView
Returns
trueif the value is an instance of one of theArrayBufferviews, such as typed array objects orDataView. Equivalent toArrayBuffer.isView(). -
isAsyncFunction
Returns
trueif 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. -
isBigInt64Array
Returns
trueif the value is aBigInt64Arrayinstance. -
isBigIntObject
Returns
trueif the value is a BigInt object, e.g. created byObject(BigInt(123)). -
isBigUint64Array
Returns
trueif the value is aBigUint64Arrayinstance. -
isBooleanObject
Returns
trueif the value is a boolean object, e.g. created bynew Boolean(). -
isBoxedPrimitive
Returns
trueif the value is any boxed primitive object, e.g. created bynew Boolean(),new String()orObject(Symbol()). -
isCryptoKey
Returns
trueifvalueis aCryptoKey,falseotherwise. -
isDataView
Returns
trueif the value is a built-inDataViewinstance. -
isDate
Returns
trueif the value is a built-inDateinstance. -
isExternal
Returns
trueif the value is a nativeExternalvalue. -
isFloat32Array
Returns
trueif the value is a built-inFloat32Arrayinstance. -
isFloat64Array
Returns
trueif the value is a built-inFloat64Arrayinstance. -
isGeneratorFunction
Returns
trueif 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. -
isGeneratorObject
Returns
trueif 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. -
isInt16Array
Returns
trueif the value is a built-inInt16Arrayinstance. -
isInt32Array
Returns
trueif the value is a built-inInt32Arrayinstance. -
isInt8Array
Returns
trueif the value is a built-inInt8Arrayinstance. -
isKeyObject
Returns
trueifvalueis aKeyObject,falseotherwise. -
isMap
Returns
trueif the value is a built-inMapinstance. -
isMapIterator
Returns
trueif the value is an iterator returned for a built-inMapinstance. -
isModuleNamespaceObject
Returns
trueif the value is an instance of a Module Namespace Object. -
isNativeError
Returns
trueif the value was returned by the constructor of a built-inErrortype. -
isNumberObject
Returns
trueif the value is a number object, e.g. created bynew Number(). -
isPromise
Returns
trueif the value is a built-inPromise. -
isProxy
Returns
trueif the value is aProxyinstance. -
isRegExp
Returns
trueif the value is a regular expression object. -
isSet
Returns
trueif the value is a built-inSetinstance. -
isSetIterator
Returns
trueif the value is an iterator returned for a built-inSetinstance. -
isSharedArrayBuffer
Returns
trueif the value is a built-inSharedArrayBufferinstance. This does not includeArrayBufferinstances. Usually, it is desirable to test for both; Seeutil.types.isAnyArrayBuffer()for that. -
isStringObject
Returns
trueif the value is a string object, e.g. created bynew String(). -
isSymbolObject
Returns
trueif the value is a symbol object, created by callingObject()on aSymbolprimitive. -
isTypedArray
Returns
trueif the value is a built-inTypedArrayinstance. -
isUint16Array
Returns
trueif the value is a built-inUint16Arrayinstance. -
isUint32Array
Returns
trueif the value is a built-inUint32Arrayinstance. -
isUint8Array
Returns
trueif the value is a built-inUint8Arrayinstance. -
isUint8ClampedArray
Returns
trueif the value is a built-inUint8ClampedArrayinstance. -
isWeakMap
Returns
trueif the value is a built-inWeakMapinstance. -
isWeakSet
Returns
trueif the value is a built-inWeakSetinstance.
node:v8
-
DefaultDeserializer
A subclass of
Deserializercorresponding to the format written byDefaultSerializer. -
DefaultSerializer
A subclass of
Serializerthat serializesTypedArray(in particularBuffer) andDataViewobjects as host objects, and only stores the part of their underlyingArrayBuffers that they are referring to. - Deserializer
-
GCProfiler
This API collects GC data in current thread.
- Serializer
-
cachedDataVersionTag
Returns an integer representing a version tag derived from the V8 version, command-line flags, and detected CPU features. This is useful for determining whether a
vm.ScriptcachedDatabuffer is compatible with this instance of V8. -
deserialize
Uses a
DefaultDeserializerwith default options to read a JS value from a buffer. -
getHeapCodeStatistics
Get statistics about code and its metadata in the heap, see V8
GetHeapCodeAndMetadataStatisticsAPI. Returns an object with the following properties: -
getHeapSnapshot
Generates a snapshot of the current V8 heap and returns a Readable Stream that may be used to read the JSON serialized representation. This JSON stream format is intended to be used with tools such as Chrome DevTools. The JSON schema is undocumented and specific to the V8 engine. Therefore, the schema may change from one version of V8 to the next.
-
getHeapSpaceStatistics
Returns statistics about the V8 heap spaces, i.e. the segments which make up the V8 heap. Neither the ordering of heap spaces, nor the availability of a heap space can be guaranteed as the statistics are provided via the V8
GetHeapSpaceStatisticsfunction and may change from one V8 version to the next. -
getHeapStatistics
Returns an object with the following properties:
-
queryObjects
This is similar to the
queryObjects()console API provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the application. -
serialize
Uses a
DefaultSerializerto serializevalueinto a buffer. -
setFlagsFromString
The
v8.setFlagsFromString()method can be used to programmatically set V8 command-line flags. This method should be used with care. Changing settings after the VM has started may result in unpredictable behavior, including crashes and data loss; or it may simply do nothing. -
setHeapSnapshotNearHeapLimit
The API is a no-op if
--heapsnapshot-near-heap-limitis already set from the command line or the API is called more than once.limitmust be a positive integer. See--heapsnapshot-near-heap-limitfor more information. -
stopCoverage
The
v8.stopCoverage()method allows the user to stop the coverage collection started byNODE_V8_COVERAGE, so that V8 can release the execution count records and optimize code. This can be used in conjunction with takeCoverage if the user wants to collect the coverage on demand. -
takeCoverage
The
v8.takeCoverage()method allows the user to write the coverage started byNODE_V8_COVERAGEto disk on demand. This method can be invoked multiple times during the lifetime of the process. Each time the execution counter will be reset and a new coverage report will be written to the directory specified byNODE_V8_COVERAGE. -
writeHeapSnapshot
Generates a snapshot of the current V8 heap and writes it to a JSON file. This file is intended to be used with tools such as Chrome DevTools. The JSON schema is undocumented and specific to the V8 engine, and may change from one version of V8 to the next.
-
After
Called immediately after a promise continuation executes. This may be after a
then(),catch(), orfinally()handler or before an await after another await. -
Before
Called before a promise continuation executes. This can be in the form of
then(),catch(), orfinally()handlers or an await resuming. - GCProfilerResult
- HeapCodeStatistics
- HeapInfo
- HeapSnapshotOptions
- HeapSpaceInfo
- HeapSpaceStatistics
- HeapStatistics
-
HookCallbacks
Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or around an await, and when the promise resolves or rejects.
-
Init
Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will happen if a promise is created without ever getting a continuation.
- PromiseHooks
-
Settled
Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of Promise.resolve() or Promise.reject().
- StartupSnapshot
- DoesZapCodeSpaceFlag
- StartupSnapshotCallbackFn
-
promiseHooks
The
promiseHooksinterface can be used to track promise lifecycle events. -
startupSnapshot
The
v8.startupSnapshotinterface can be used to add serialization and deserialization hooks for custom startup snapshots.
node:vm
-
Module
This feature is only available with the
--experimental-vm-modulescommand flag enabled. - Script
-
SourceTextModule
This feature is only available with the
--experimental-vm-modulescommand flag enabled. -
SyntheticModule
This feature is only available with the
--experimental-vm-modulescommand flag enabled. -
compileFunction
Compiles the given code into the provided context (if no context is supplied, the current context is used), and returns it wrapped inside a function with the given
params. - createContext
-
isContext
Returns
trueif the givenobjectobject has been contextified using createContext, or if it's the global object of a context created usingvm.constants.DONT_CONTEXTIFY. - measureMemory
-
runInContext
The
vm.runInContext()method compilescode, runs it within the context of thecontextifiedObject, then returns the result. Running code does not have access to the local scope. ThecontextifiedObjectobject must have been previouslycontextifiedusing the createContext method. -
runInNewContext
This method is a shortcut to
(new vm.Script(code, options)).runInContext(vm.createContext(options), options). Ifoptionsis a string, then it specifies the filename. -
runInThisContext
vm.runInThisContext()compilescode, runs it within the context of the currentglobaland returns the result. Running code does not have access to local scope, but does have access to the currentglobalobject. - BaseOptions
- CompileFunctionOptions
- Context
- CreateContextOptions
- MeasureMemoryOptions
- MemoryMeasurement
- ModuleEvaluateOptions
- RunningCodeInNewContextOptions
- RunningCodeOptions
- RunningScriptInNewContextOptions
- RunningScriptOptions
- ScriptOptions
- SourceTextModuleOptions
- SyntheticModuleOptions
-
constants
Returns an object containing commonly used constants for VM operations.
- MeasureMemoryMode
- ModuleLinker
- ModuleStatus
-
constants.DONT_CONTEXTIFY
This constant, when used as the
contextObjectargument in vm APIs, instructs Node.js to create a context without wrapping its global object with another object in a Node.js-specific manner. As a result, theglobalThisvalue inside the new context would behave more closely to an ordinary one. -
constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
A constant that can be used as the
importModuleDynamicallyoption tovm.Scriptandvm.compileFunction()so that Node.js uses the default ESM loader from the main context to load the requested module.
node:wasi
node:worker_threads
-
MessageChannel
Instances of the
worker.MessageChannelclass represent an asynchronous, two-way communications channel. TheMessageChannelhas no methods of its own.new MessageChannel()yields an object withport1andport2properties, which refer to linkedMessagePortinstances. -
MessagePort
Instances of the
worker.MessagePortclass represent one end of an asynchronous, two-way communications channel. It can be used to transfer structured data, memory regions and otherMessagePorts between differentWorkers. - Worker
-
getEnvironmentData
Within a worker thread,
worker.getEnvironmentData()returns a clone of data passed to the spawning thread'sworker.setEnvironmentData(). Every newWorkerreceives its own copy of the environment data automatically. -
isMarkedAsUntransferable
Check if an object is marked as not transferable with markAsUntransferable.
-
markAsUncloneable
Mark an object as not cloneable. If
objectis used asmessagein aport.postMessage()call, an error is thrown. This is a no-op ifobjectis a primitive value. - markAsUntransferable
- moveMessagePortToContext
- receiveMessageOnPort
-
setEnvironmentData
The
worker.setEnvironmentData()API sets the content ofworker.getEnvironmentData()in the current thread and all newWorkerinstances spawned from the current context. -
BroadcastChannel
Instances of
BroadcastChannelallow asynchronous one-to-many communication with all otherBroadcastChannelinstances bound to the same channel name. - ResourceLimits
- WorkerOptions
- WorkerPerformance
- Serializable
- TransferListItem
- isInternalThread
- isMainThread
- parentPort
- resourceLimits
- SHARE_ENV
- threadId
- workerData
node:zlib
- brotliCompress
-
brotliCompressSync
Compress a chunk of data with
BrotliCompress. - brotliDecompress
-
brotliDecompressSync
Decompress a chunk of data with
BrotliDecompress. -
crc32
Computes a 32-bit Cyclic Redundancy Check checksum of
data. Ifvalueis specified, it is used as the starting value of the checksum, otherwise, 0 is used as the starting value. -
createBrotliCompress
Creates and returns a new
BrotliCompressobject. -
createBrotliDecompress
Creates and returns a new
BrotliDecompressobject. -
createDeflate
Creates and returns a new
Deflateobject. -
createDeflateRaw
Creates and returns a new
DeflateRawobject. -
createGunzip
Creates and returns a new
Gunzipobject. -
createGzip
Creates and returns a new
Gzipobject. Seeexample. -
createInflate
Creates and returns a new
Inflateobject. -
createInflateRaw
Creates and returns a new
InflateRawobject. -
createUnzip
Creates and returns a new
Unzipobject. - deflate
- deflateRaw
-
deflateRawSync
Compress a chunk of data with
DeflateRaw. -
deflateSync
Compress a chunk of data with
Deflate. - gunzip
-
gunzipSync
Decompress a chunk of data with
Gunzip. - gzip
-
gzipSync
Compress a chunk of data with
Gzip. - inflate
- inflateRaw
-
inflateRawSync
Decompress a chunk of data with
InflateRaw. -
inflateSync
Decompress a chunk of data with
Inflate. - unzip
-
unzipSync
Decompress a chunk of data with
Unzip. - BrotliCompress
- BrotliDecompress
- BrotliOptions
- Deflate
- DeflateRaw
- Gunzip
- Gzip
- Inflate
- InflateRaw
- Unzip
- Zlib
- ZlibOptions
- ZlibParams
- ZlibReset
- constants
- CompressCallback
- InputType
- constants.BROTLI_DECODE
- constants.BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES
- constants.BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP
- constants.BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES
- constants.BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1
- constants.BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2
- constants.BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS
- constants.BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET
- constants.BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1
- constants.BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2
- constants.BROTLI_DECODER_ERROR_FORMAT_CL_SPACE
- constants.BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT
- constants.BROTLI_DECODER_ERROR_FORMAT_DICTIONARY
- constants.BROTLI_DECODER_ERROR_FORMAT_DISTANCE
- constants.BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE
- constants.BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE
- constants.BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE
- constants.BROTLI_DECODER_ERROR_FORMAT_PADDING_1
- constants.BROTLI_DECODER_ERROR_FORMAT_PADDING_2
- constants.BROTLI_DECODER_ERROR_FORMAT_RESERVED
- constants.BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET
- constants.BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME
- constants.BROTLI_DECODER_ERROR_FORMAT_TRANSFORM
- constants.BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS
- constants.BROTLI_DECODER_ERROR_INVALID_ARGUMENTS
- constants.BROTLI_DECODER_ERROR_UNREACHABLE
- constants.BROTLI_DECODER_NEEDS_MORE_INPUT
- constants.BROTLI_DECODER_NEEDS_MORE_OUTPUT
- constants.BROTLI_DECODER_NO_ERROR
- constants.BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION
- constants.BROTLI_DECODER_PARAM_LARGE_WINDOW
- constants.BROTLI_DECODER_RESULT_ERROR
- constants.BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT
- constants.BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT
- constants.BROTLI_DECODER_RESULT_SUCCESS
- constants.BROTLI_DECODER_SUCCESS
- constants.BROTLI_DEFAULT_MODE
- constants.BROTLI_DEFAULT_QUALITY
- constants.BROTLI_DEFAULT_WINDOW
- constants.BROTLI_ENCODE
- constants.BROTLI_LARGE_MAX_WINDOW_BITS
- constants.BROTLI_MAX_INPUT_BLOCK_BITS
- constants.BROTLI_MAX_QUALITY
- constants.BROTLI_MAX_WINDOW_BITS
- constants.BROTLI_MIN_INPUT_BLOCK_BITS
- constants.BROTLI_MIN_QUALITY
- constants.BROTLI_MIN_WINDOW_BITS
- constants.BROTLI_MODE_FONT
- constants.BROTLI_MODE_GENERIC
- constants.BROTLI_MODE_TEXT
- constants.BROTLI_OPERATION_EMIT_METADATA
- constants.BROTLI_OPERATION_FINISH
- constants.BROTLI_OPERATION_FLUSH
- constants.BROTLI_OPERATION_PROCESS
- constants.BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING
- constants.BROTLI_PARAM_LARGE_WINDOW
- constants.BROTLI_PARAM_LGBLOCK
- constants.BROTLI_PARAM_LGWIN
- constants.BROTLI_PARAM_MODE
- constants.BROTLI_PARAM_NDIRECT
- constants.BROTLI_PARAM_NPOSTFIX
- constants.BROTLI_PARAM_QUALITY
- constants.BROTLI_PARAM_SIZE_HINT
- constants.DEFLATE
- constants.DEFLATERAW
- constants.GUNZIP
- constants.GZIP
- constants.INFLATE
- constants.INFLATERAW
- constants.UNZIP
- constants.Z_BEST_COMPRESSION
- constants.Z_BEST_SPEED
- constants.Z_BLOCK
- constants.Z_BUF_ERROR
- constants.Z_DATA_ERROR
- constants.Z_DEFAULT_CHUNK
- constants.Z_DEFAULT_COMPRESSION
- constants.Z_DEFAULT_LEVEL
- constants.Z_DEFAULT_MEMLEVEL
- constants.Z_DEFAULT_STRATEGY
- constants.Z_DEFAULT_WINDOWBITS
- constants.Z_ERRNO
- constants.Z_FILTERED
- constants.Z_FINISH
- constants.Z_FIXED
- constants.Z_FULL_FLUSH
- constants.Z_HUFFMAN_ONLY
- constants.Z_MAX_CHUNK
- constants.Z_MAX_LEVEL
- constants.Z_MAX_MEMLEVEL
- constants.Z_MAX_WINDOWBITS
- constants.Z_MEM_ERROR
- constants.Z_MIN_CHUNK
- constants.Z_MIN_LEVEL
- constants.Z_MIN_MEMLEVEL
- constants.Z_MIN_WINDOWBITS
- constants.Z_NEED_DICT
- constants.Z_NO_COMPRESSION
- constants.Z_NO_FLUSH
- constants.Z_OK
- constants.Z_PARTIAL_FLUSH
- constants.Z_RLE
- constants.Z_STREAM_END
- constants.Z_STREAM_ERROR
- constants.Z_SYNC_FLUSH
- constants.Z_TREES
- constants.Z_VERSION_ERROR
- constants.ZLIB_VERNUM
- Z_ASCII
- Z_BEST_COMPRESSION
- Z_BEST_SPEED
- Z_BINARY
- Z_BLOCK
- Z_BUF_ERROR
- Z_DATA_ERROR
- Z_DEFAULT_COMPRESSION
- Z_DEFAULT_STRATEGY
- Z_DEFLATED
- Z_ERRNO
- Z_FILTERED
- Z_FINISH
- Z_FIXED
- Z_FULL_FLUSH
- Z_HUFFMAN_ONLY
- Z_MEM_ERROR
- Z_NEED_DICT
- Z_NO_COMPRESSION
- Z_NO_FLUSH
- Z_OK
- Z_PARTIAL_FLUSH
- Z_RLE
- Z_STREAM_END
- Z_STREAM_ERROR
- Z_SYNC_FLUSH
- Z_TEXT
- Z_TREES
- Z_UNKNOWN
- Z_VERSION_ERROR
© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/api/node