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.AssertionErrorc
Indicates the failure of an assertion. All errors thrown by the
node:assertmodule will be instances of theAssertionErrorclass. - assert.CallTrackerc
This feature is deprecated and will be removed in a future version. Please consider using alternatives such as the
mockhelper function. - assertfN
An alias of ok.
- assert.deepEqualf
Strict assertion mode
- assert.deepStrictEqualf
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.doesNotMatchf
Expects the
stringinput not to match the regular expression. - assert.doesNotRejectf
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.doesNotThrowf
Asserts that the function
fndoes not throw an error. - assert.equalf
Strict assertion mode
- assert.failf
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.ifErrorf
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.matchf
Expects the
stringinput to match the regular expression. - assert.notDeepEqualf
Strict assertion mode
- assert.notDeepStrictEqualf
Tests for deep strict inequality. Opposite of deepStrictEqual.
- assert.notEqualf
Strict assertion mode
- assert.notStrictEqualf
Tests strict inequality between the
actualandexpectedparameters as determined byObject.is(). - assert.okf
Tests if
valueis truthy. It is equivalent toassert.equal(!!value, true, message). - assert.partialDeepStrictEqualf
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.rejectsf
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.strictEqualf
Tests strict equality between the
actualandexpectedparameters as determined byObject.is(). - assert.throwsf
Expects the function
fnto throw an error. - assert.CallTrackerCallI
- assert.CallTrackerReportInformationI
- assert.strictNv
In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example, deepEqual will behave like deepStrictEqual.
- assert.AssertPredicateT
- assert.strict.AssertionErrorT
- assert.strict.AssertPredicateT
- assert.strict.CallTrackerCallT
- assert.strict.CallTrackerReportInformationT
node:async_hooks
- AsyncLocalStoragec
This class creates stores that stay coherent through asynchronous operations.
- AsyncResourcec
- createHookf
- executionAsyncIdf
- executionAsyncResourcef
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. - triggerAsyncIdf
Promise contexts may not get valid
triggerAsyncIds by default. See the section on promise execution tracking. - AsyncHookI
- AsyncResourceOptionsI
- HookCallbacksI
node:buffer
- BlobcIv
A
Blobencapsulates immutable, raw data that can be safely shared across multiple worker threads. - FilecIv
A
Fileprovides information about files. - atobf
Decodes a string of Base64-encoded data into bytes, and encodes those bytes into a string using Latin-1 (ISO-8859-1).
- btoaf
Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes into a string using Base64.
- isAsciif
This function returns
trueifinputcontains only valid ASCII-encoded data, including the case in whichinputis empty. - isUtf8f
This function returns
trueifinputcontains only valid UTF-8-encoded data, including the case in whichinputis empty. - resolveObjectURLf
Resolves a
'blob:nodedata:...'an associatedBlobobject registered using a prior call toURL.createObjectURL(). - transcodef
Re-encodes the given
BufferorUint8Arrayinstance from one character encoding to another. Returns a newBufferinstance. - BlobOptionsI
- BufferIv
- BufferConstructorI
- FileOptionsI
- BufferEncodingT
- ImplicitArrayBufferT
Bufferobjects are used to represent a fixed-length sequence of bytes. Many Node.js APIs supportBuffers. - TranscodeEncodingT
- WithImplicitCoercionT
- constantsv
- INSPECT_MAX_BYTESv
- kMaxLengthv
- kStringMaxLengthv
- SlowBufferv
node:child_process
- ChildProcessc
Instances of the
ChildProcessrepresent spawned child processes. - execf
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: - execFilef
- execFileSyncf
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. - execSyncf
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. - forkf
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. - spawnf
The
child_process.spawn()method spawns a new process using the givencommand, with command-line arguments inargs. If omitted,argsdefaults to an empty array. - spawnSyncf
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. - ChildProcessByStdioI
- ChildProcessWithoutNullStreamsI
- CommonExecOptionsI
- CommonOptionsI
- CommonSpawnOptionsI
- ExecExceptionI
- ExecFileOptionsI
- ExecFileOptionsWithBufferEncodingI
- ExecFileOptionsWithOtherEncodingI
- ExecFileOptionsWithStringEncodingI
- ExecFileSyncOptionsI
- ExecFileSyncOptionsWithBufferEncodingI
- ExecFileSyncOptionsWithStringEncodingI
- ExecOptionsI
- ExecOptionsWithBufferEncodingI
- ExecOptionsWithStringEncodingI
- ExecSyncOptionsI
- ExecSyncOptionsWithBufferEncodingI
- ExecSyncOptionsWithStringEncodingI
- ForkOptionsI
- MessageOptionsI
- MessagingOptionsI
- ProcessEnvOptionsI
- PromiseWithChildI
- SpawnOptionsI
- SpawnOptionsWithoutStdioI
- SpawnOptionsWithStdioTupleI
- SpawnSyncOptionsI
- SpawnSyncOptionsWithBufferEncodingI
- SpawnSyncOptionsWithStringEncodingI
- SpawnSyncReturnsI
- ExecFileExceptionT
- IOTypeT
- SendHandleT
- SerializableT
- SerializationTypeT
- StdioNullT
- StdioOptionsT
- StdioPipeT
- StdioPipeNamedT
node:cluster
node:console
- ConsoleI
- console.ConsoleConstructorI
- console.ConsoleConstructorOptionsI
- consoleNv
The
consolemodule provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers.
node:constants
node:crypto
- Certificatec
- Cipherc
Instances of the
Cipherclass are used to encrypt data. The class can be used in one of two ways: - Decipherc
Instances of the
Decipherclass are used to decrypt data. The class can be used in one of two ways: - DiffieHellmanc
The
DiffieHellmanclass is a utility for creating Diffie-Hellman key exchanges. - ECDHc
- Hashc
The
Hashclass is a utility for creating hash digests of data. It can be used in one of two ways: - KeyObjectc
- Signc
- Verifyc
The
Verifyclass is a utility for verifying signatures. It can be used in one of two ways: - X509Certificatec
Encapsulates an X509 certificate and provides read-only access to its information.
- Hmacc
The
Hmacclass is a utility for creating cryptographic HMAC digests. It can be used in one of two ways: - checkPrimef
Checks the primality of the
candidate. - checkPrimeSyncf
Checks the primality of the
candidate. - createCipherivf
Creates and returns a
Cipherobject, with the givenalgorithm,keyand initialization vector (iv). - createDecipherivf
Creates and returns a
Decipherobject that uses the givenalgorithm,keyand initialization vector (iv). - createDiffieHellmanf
Creates a
DiffieHellmankey exchange object using the suppliedprimeand an optional specificgenerator. - createDiffieHellmanGroupf
An alias for getDiffieHellman
- createECDHf
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. - createHashf
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. - createHmacf
Creates and returns an
Hmacobject that uses the givenalgorithmandkey. Optionaloptionsargument controls stream behavior. - createPrivateKeyf
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. - createPublicKeyf
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. - createSecretKeyf
Creates and returns a new key object containing a secret key for symmetric encryption or
Hmac. - createSignf
Creates and returns a
Signobject that uses the givenalgorithm. Use getHashes to obtain the names of the available digest algorithms. Optionaloptionsargument controls thestream.Writablebehavior. - createVerifyf
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. - diffieHellmanf
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). - generateKeyf
Asynchronously generates a new random secret key of the given
length. Thetypewill determine which validations will be performed on thelength. - generateKeyPairf
- generateKeyPairSyncf
Generates a new asymmetric key pair of the given
type. RSA, RSA-PSS, DSA, EC, Ed25519, Ed448, X25519, X448, and DH are currently supported. - generateKeySyncf
Synchronously generates a new random secret key of the given
length. Thetypewill determine which validations will be performed on thelength. - generatePrimef
- generatePrimeSyncf
Generates a pseudorandom prime of
sizebits. - getCipherInfof
Returns information about a given cipher.
- getCiphersf
- getCurvesf
- getDiffieHellmanf
Creates a predefined
DiffieHellmanGroupkey exchange object. The supported groups are listed in the documentation forDiffieHellmanGroup. - getFipsf
- getHashesf
- getRandomValuesf
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.
- hashf
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. - hkdff
HKDF is a simple key derivation function defined in RFC 5869. The given
ikm,saltandinfoare used with thedigestto derive a key ofkeylenbytes. - hkdfSyncf
Provides a synchronous HKDF key derivation function as defined in RFC 5869. The given
ikm,saltandinfoare used with thedigestto derive a key ofkeylenbytes. - pbkdf2f
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. - pbkdf2Syncf
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. - privateDecryptf
Decrypts
bufferwithprivateKey.bufferwas previously encrypted using the corresponding public key, for example using publicEncrypt. - privateEncryptf
Encrypts
bufferwithprivateKey. The returned data can be decrypted using the corresponding public key, for example using publicDecrypt. - pseudoRandomBytesf
- publicDecryptf
- publicEncryptf
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. - randomBytesf
Generates cryptographically strong pseudorandom data. The
sizeargument is a number indicating the number of bytes to generate. - randomFillf
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. - randomFillSyncf
Synchronous version of randomFill.
- randomIntf
Return a random integer
nsuch thatmin <= n < max. This implementation avoids modulo bias. - randomUUIDf
Generates a random RFC 4122 version 4 UUID. The UUID is generated using a cryptographic pseudorandom number generator.
- scryptf
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.
- scryptSyncf
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.
- secureHeapUsedf
- setEnginef
- setFipsf
Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available.
- signf
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). - timingSafeEqualf
This function compares the underlying bytes that represent the given
ArrayBuffer,TypedArray, orDataViewinstances using a constant-time algorithm. - verifyf
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). - AsymmetricKeyDetailsI
- BasePrivateKeyEncodingOptionsI
- CheckPrimeOptionsI
- CipherCCMI
- CipherCCMOptionsI
- CipherChaCha20Poly1305I
- CipherChaCha20Poly1305OptionsI
- CipherGCMI
- CipherGCMOptionsI
- CipherInfoI
- CipherInfoOptionsI
- CipherOCBI
- CipherOCBOptionsI
- DecipherCCMI
- DecipherChaCha20Poly1305I
- DecipherGCMI
- DecipherOCBI
- DiffieHellmanGroupConstructorI
- DSAKeyPairKeyObjectOptionsI
- DSAKeyPairOptionsI
- ECKeyPairKeyObjectOptionsI
- ECKeyPairOptionsI
- ED25519KeyPairKeyObjectOptionsI
- ED25519KeyPairOptionsI
- ED448KeyPairKeyObjectOptionsI
- ED448KeyPairOptionsI
- GeneratePrimeOptionsI
- GeneratePrimeOptionsArrayBufferI
- GeneratePrimeOptionsBigIntI
- HashOptionsI
- JsonWebKeyI
- JsonWebKeyInputI
- JwkKeyExportOptionsI
- KeyExportOptionsI
- KeyPairKeyObjectResultI
- KeyPairSyncResultI
- PrivateKeyInputI
- PublicKeyInputI
- RandomUUIDOptionsI
- RSAKeyPairKeyObjectOptionsI
- RSAKeyPairOptionsI
- RsaPrivateKeyI
- RSAPSSKeyPairKeyObjectOptionsI
- RSAPSSKeyPairOptionsI
- RsaPublicKeyI
- ScryptOptionsI
- SecureHeapUsageI
- SigningOptionsI
- SignJsonWebKeyInputI
- SignKeyObjectInputI
- SignPrivateKeyInputI
- VerifyJsonWebKeyInputI
- VerifyKeyObjectInputI
- VerifyPublicKeyInputI
- webcrypto.AesCbcParamsI
- webcrypto.AesCtrParamsI
- webcrypto.AesDerivedKeyParamsI
- webcrypto.AesGcmParamsI
- webcrypto.AesKeyAlgorithmI
- webcrypto.AesKeyGenParamsI
- webcrypto.AlgorithmI
- webcrypto.CryptoI
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.CryptoKeyI
- webcrypto.CryptoKeyConstructorI
- webcrypto.CryptoKeyPairI
The
CryptoKeyPairis a simple dictionary object withpublicKeyandprivateKeyproperties, representing an asymmetric key pair. - webcrypto.EcdhKeyDeriveParamsI
- webcrypto.EcdsaParamsI
- webcrypto.EcKeyAlgorithmI
- webcrypto.EcKeyGenParamsI
- webcrypto.EcKeyImportParamsI
- webcrypto.Ed448ParamsI
- webcrypto.HkdfParamsI
- webcrypto.HmacImportParamsI
- webcrypto.HmacKeyAlgorithmI
- webcrypto.HmacKeyGenParamsI
- webcrypto.JsonWebKeyI
- webcrypto.KeyAlgorithmI
- webcrypto.Pbkdf2ParamsI
- webcrypto.RsaHashedImportParamsI
- webcrypto.RsaHashedKeyAlgorithmI
- webcrypto.RsaHashedKeyGenParamsI
- webcrypto.RsaKeyAlgorithmI
- webcrypto.RsaKeyGenParamsI
- webcrypto.RsaOaepParamsI
- webcrypto.RsaOtherPrimesInfoI
- webcrypto.RsaPssParamsI
- webcrypto.SubtleCryptoI
- X25519KeyPairKeyObjectOptionsI
- X25519KeyPairOptionsI
- X448KeyPairKeyObjectOptionsI
- X448KeyPairOptionsI
- X509CheckOptionsI
- constantsN
- BinaryLikeT
- BinaryToTextEncodingT
- CharacterEncodingT
- CipherCCMTypesT
- CipherChaCha20Poly1305TypesT
- CipherGCMTypesT
- CipherKeyT
- CipherModeT
- CipherOCBTypesT
- DSAEncodingT
- ECDHKeyFormatT
- EncodingT
- KeyFormatT
- KeyLikeT
- KeyObjectTypeT
- KeyTypeT
- LargeNumberLikeT
- LegacyCharacterEncodingT
- UUIDT
- webcrypto.AlgorithmIdentifierT
- webcrypto.BigIntegerT
- webcrypto.BufferSourceT
- webcrypto.HashAlgorithmIdentifierT
- webcrypto.KeyFormatT
- webcrypto.KeyTypeT
- webcrypto.KeyUsageT
- webcrypto.NamedCurveT
- constants.defaultCipherListv
Specifies the active default cipher list used by the current Node.js process (colon-separated values).
- constants.defaultCoreCipherListv
Specifies the built-in default cipher list used by Node.js (colon-separated values).
- constants.DH_CHECK_P_NOT_PRIMEv
- constants.DH_CHECK_P_NOT_SAFE_PRIMEv
- constants.DH_NOT_SUITABLE_GENERATORv
- constants.DH_UNABLE_TO_CHECK_GENERATORv
- constants.ENGINE_METHOD_ALLv
- constants.ENGINE_METHOD_CIPHERSv
- constants.ENGINE_METHOD_DHv
- constants.ENGINE_METHOD_DIGESTSv
- constants.ENGINE_METHOD_DSAv
- constants.ENGINE_METHOD_ECv
- constants.ENGINE_METHOD_NONEv
- constants.ENGINE_METHOD_PKEY_ASN1_METHSv
- constants.ENGINE_METHOD_PKEY_METHSv
- constants.ENGINE_METHOD_RANDv
- constants.ENGINE_METHOD_RSAv
- constants.OPENSSL_VERSION_NUMBERv
- constants.POINT_CONVERSION_COMPRESSEDv
- constants.POINT_CONVERSION_HYBRIDv
- constants.POINT_CONVERSION_UNCOMPRESSEDv
- constants.RSA_NO_PADDINGv
- constants.RSA_PKCS1_OAEP_PADDINGv
- constants.RSA_PKCS1_PADDINGv
- constants.RSA_PKCS1_PSS_PADDINGv
- constants.RSA_PSS_SALTLEN_AUTOv
Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature.
- constants.RSA_PSS_SALTLEN_DIGESTv
Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying.
- constants.RSA_PSS_SALTLEN_MAX_SIGNv
Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data.
- constants.RSA_SSLV23_PADDINGv
- constants.RSA_X931_PADDINGv
- constants.SSL_OP_ALLv
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_KEXv
Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3
- constants.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATIONv
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_PREFERENCEv
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_ANYCONNECTv
Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER.
- constants.SSL_OP_COOKIE_EXCHANGEv
Instructs OpenSSL to turn on cookie exchange.
- constants.SSL_OP_CRYPTOPRO_TLSEXT_BUGv
Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft.
- constants.SSL_OP_DONT_INSERT_EMPTY_FRAGMENTSv
Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d.
- constants.SSL_OP_LEGACY_SERVER_CONNECTv
Allows initial connection to servers that do not support RI.
- constants.SSL_OP_NO_COMPRESSIONv
Instructs OpenSSL to disable support for SSL/TLS compression.
- constants.SSL_OP_NO_ENCRYPT_THEN_MACv
Instructs OpenSSL to disable encrypt-then-MAC.
- constants.SSL_OP_NO_QUERY_MTUv
- constants.SSL_OP_NO_RENEGOTIATIONv
Instructs OpenSSL to disable renegotiation.
- constants.SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATIONv
Instructs OpenSSL to always start a new session when performing renegotiation.
- constants.SSL_OP_NO_SSLv2v
Instructs OpenSSL to turn off SSL v2
- constants.SSL_OP_NO_SSLv3v
Instructs OpenSSL to turn off SSL v3
- constants.SSL_OP_NO_TICKETv
Instructs OpenSSL to disable use of RFC4507bis tickets.
- constants.SSL_OP_NO_TLSv1v
Instructs OpenSSL to turn off TLS v1
- constants.SSL_OP_NO_TLSv1_1v
Instructs OpenSSL to turn off TLS v1.1
- constants.SSL_OP_NO_TLSv1_2v
Instructs OpenSSL to turn off TLS v1.2
- constants.SSL_OP_NO_TLSv1_3v
Instructs OpenSSL to turn off TLS v1.3
- constants.SSL_OP_PRIORITIZE_CHACHAv
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_BUGv
Instructs OpenSSL to disable version rollback attack detection.
- cryptov
- DiffieHellmanGroupTv
- subtlev
A convenient alias for
crypto.webcrypto.subtle. - webcryptoNv
- fipsv
node:dgram
- Socketc
- createSocketf
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. - BindOptionsI
- RemoteInfoI
- SocketOptionsI
- SocketTypeT
node:diagnostics_channel
- Channelc
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. - TracingChannelc
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. - channelf
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.
- hasSubscribersf
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.
- subscribef
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'. - tracingChannelf
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. - unsubscribef
Remove a message handler previously registered to this channel with subscribe.
- TracingChannelCollectionI
- TracingChannelSubscribersI
- ChannelListenerT
node:dns
- promises.Resolverc
An independent resolver for DNS requests.
- Resolverc
An independent resolver for DNS requests.
- getDefaultResultOrderf
Get the default value for
orderin lookup anddnsPromises.lookup(). The value could be: - getServersf
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.
- lookupf
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. - lookupServicef
Resolves the given
addressandportinto a host name and service using the operating system's underlyinggetnameinfoimplementation. - promises.getDefaultResultOrderf
Get the default value for
verbatimin lookup and dnsPromises.lookup(). The value could be: - promises.getServersf
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.lookupf
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.lookupServicef
Resolves the given
addressandportinto a host name and service using the operating system's underlyinggetnameinfoimplementation. - promises.resolvef
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.resolve4f
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.resolve6f
Uses the DNS protocol to resolve IPv6 addresses (
AAAArecords) for thehostname. On success, thePromiseis resolved with an array of IPv6 addresses. - promises.resolveAnyf
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.resolveCaaf
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.resolveCnamef
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.resolveMxf
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.resolveNaptrf
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.resolveNsf
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.resolvePtrf
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.resolveSoaf
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.resolveSrvf
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.resolveTxtf
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.reversef
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names.
- promises.setDefaultResultOrderf
Set the default value of
orderindns.lookup()and[lookup](/api/node/dns/. The value could be: - promises.setServersf
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. - resolvef
- resolve4f
- resolve6f
- resolveAnyf
- resolveCaaf
- resolveCnamef
- resolveMxf
- resolveNaptrf
- resolveNsf
- resolvePtrf
- resolveSoaf
- resolveSrvf
- resolveTxtf
- reversef
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names.
- setDefaultResultOrderf
Set the default value of
orderin lookup anddnsPromises.lookup(). The value could be: - setServersf
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. - AnyAaaaRecordI
- AnyARecordI
- AnyCnameRecordI
- AnyMxRecordI
- AnyNaptrRecordI
- AnyNsRecordI
- AnyPtrRecordI
- AnySoaRecordI
- AnySrvRecordI
- AnyTxtRecordI
- CaaRecordI
- LookupAddressI
- LookupAllOptionsI
- LookupOneOptionsI
- LookupOptionsI
- MxRecordI
- NaptrRecordI
- RecordWithTtlI
- ResolveOptionsI
- ResolverOptionsI
- ResolveWithTtlOptionsI
- SoaRecordI
- SrvRecordI
- promisesN
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'. - AnyRecordT
- AnyRecordWithTtlT
- ADDRCONFIGv
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.
- ADDRGETNETWORKPARAMSv
- ALLv
If
dns.V4MAPPEDis specified, return resolved IPv6 addresses as well as IPv4 mapped IPv6 addresses. - BADFAMILYv
- BADFLAGSv
- BADHINTSv
- BADNAMEv
- BADQUERYv
- BADRESPv
- BADSTRv
- CANCELLEDv
- CONNREFUSEDv
- DESTRUCTIONv
- EOFv
- FILEv
- FORMERRv
- LOADIPHLPAPIv
- NODATAv
- NOMEMv
- NONAMEv
- NOTFOUNDv
- NOTIMPv
- NOTINITIALIZEDv
- promises.ADDRGETNETWORKPARAMSv
- promises.BADFAMILYv
- promises.BADFLAGSv
- promises.BADHINTSv
- promises.BADNAMEv
- promises.BADQUERYv
- promises.BADRESPv
- promises.BADSTRv
- promises.CANCELLEDv
- promises.CONNREFUSEDv
- promises.DESTRUCTIONv
- promises.EOFv
- promises.FILEv
- promises.FORMERRv
- promises.LOADIPHLPAPIv
- promises.NODATAv
- promises.NOMEMv
- promises.NONAMEv
- promises.NOTFOUNDv
- promises.NOTIMPv
- promises.NOTINITIALIZEDv
- promises.REFUSEDv
- promises.SERVFAILv
- promises.TIMEOUTv
- REFUSEDv
- SERVFAILv
- TIMEOUTv
- V4MAPPEDv
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
- Resolverc
An independent resolver for DNS requests.
- getDefaultResultOrderf
Get the default value for
verbatimin lookup and dnsPromises.lookup(). The value could be: - getServersf
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.
- lookupf
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. - lookupServicef
Resolves the given
addressandportinto a host name and service using the operating system's underlyinggetnameinfoimplementation. - resolvef
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: - resolve4f
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']). - resolve6f
Uses the DNS protocol to resolve IPv6 addresses (
AAAArecords) for thehostname. On success, thePromiseis resolved with an array of IPv6 addresses. - resolveAnyf
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: - resolveCaaf
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'}]). - resolveCnamef
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']). - resolveMxf
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'}, ...]). - resolveNaptrf
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: - resolveNsf
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']). - resolvePtrf
Uses the DNS protocol to resolve pointer records (
PTRrecords) for thehostname. On success, thePromiseis resolved with an array of strings containing the reply records. - resolveSoaf
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: - resolveSrvf
Uses the DNS protocol to resolve service records (
SRVrecords) for thehostname. On success, thePromiseis resolved with an array of objects with the following properties: - resolveTxtf
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. - reversef
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names.
- setDefaultResultOrderf
Set the default value of
orderindns.lookup()and[lookup](/api/node/dns/promises/. The value could be: - setServersf
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. - ADDRGETNETWORKPARAMSv
- BADFAMILYv
- BADFLAGSv
- BADHINTSv
- BADNAMEv
- BADQUERYv
- BADRESPv
- BADSTRv
- CANCELLEDv
- CONNREFUSEDv
- DESTRUCTIONv
- EOFv
- FILEv
- FORMERRv
- LOADIPHLPAPIv
- NODATAv
- NOMEMv
- NONAMEv
- NOTFOUNDv
- NOTIMPv
- NOTINITIALIZEDv
- REFUSEDv
- SERVFAILv
- TIMEOUTv
node:domain
node:events
- EventEmitter.EventEmitterAsyncResourcec
Integrates
EventEmitterwithAsyncResourceforEventEmitters that require manual async tracking. Specifically, all events emitted by instances ofevents.EventEmitterAsyncResourcewill run within itsasync context. - EventEmittercIN
The
EventEmitterclass is defined and exposed by thenode:eventsmodule: - EventEmitter.AbortableI
- EventEmitter.EventEmitterAsyncResourceOptionsI
- EventEmitter.EventEmitterReferencingAsyncResourceI
- EventEmitterOptionsI
- StaticEventEmitterIteratorOptionsI
- StaticEventEmitterOptionsI
- AnyRestT
- ArgsT
- DefaultEventMapT
- EventMapT
- KeyT
- Key2T
- ListenerT
- Listener1T
- Listener2T
node:fs
- Dirc
A class representing a directory stream.
- Direntc
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. - ReadStreamc
Instances of
fs.ReadStreamare created and returned using the createReadStream function. - WriteStreamc
- Extends
stream.Writable - Extends
- accessf
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. - accessSyncf
Synchronously 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. - appendFilef
Asynchronously append data to a file, creating the file if it does not yet exist.
datacan be a string or aBuffer. - appendFileSyncf
Synchronously append data to a file, creating the file if it does not yet exist.
datacan be a string or aBuffer. - chmodf
Asynchronously changes the permissions of a file. No arguments other than a possible exception are given to the completion callback.
- chmodSyncf
For detailed information, see the documentation of the asynchronous version of this API: chmod.
- chownf
Asynchronously changes owner and group of a file. No arguments other than a possible exception are given to the completion callback.
- chownSyncf
Synchronously changes owner and group of a file. Returns
undefined. This is the synchronous version of chown. - closef
Closes the file descriptor. No arguments other than a possible exception are given to the completion callback.
- closeSyncf
Closes the file descriptor. Returns
undefined. - copyFilef
Asynchronously copies
srctodest. By default,destis 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. - copyFileSyncf
Synchronously copies
srctodest. By default,destis overwritten if it already exists. Returnsundefined. 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. - cpf
Asynchronously copies the entire directory structure from
srctodest, including subdirectories and files. - cpSyncf
Synchronously copies the entire directory structure from
srctodest, including subdirectories and files. - createReadStreamf
optionscan includestartandendvalues to read a range of bytes from the file instead of the entire file. Bothstartandendare inclusive and start counting at 0, allowed values are in the [0,Number.MAX_SAFE_INTEGER] range. Iffdis specified andstartis omitted orundefined,fs.createReadStream()reads sequentially from the current file position. Theencodingcan be any one of those accepted byBuffer. - createWriteStreamf
optionsmay also include astartoption 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 theflagsoption to be set tor+rather than the defaultw. Theencodingcan be any one of those accepted byBuffer. - existsSyncf
Returns
trueif the path exists,falseotherwise. - fchmodf
Sets the permissions on the file. No arguments other than a possible exception are given to the completion callback.
- fchmodSyncf
Sets the permissions on the file. Returns
undefined. - fchownf
Sets the owner of the file. No arguments other than a possible exception are given to the completion callback.
- fchownSyncf
Sets the owner of the file. Returns
undefined. - fdatasyncf
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. - fdatasyncSyncf
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. Returnsundefined. - fstatf
Invokes the callback with the
fs.Statsfor the file descriptor. - fstatSyncf
Retrieves the
fs.Statsfor the file descriptor. - fsyncf
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. - fsyncSyncf
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. Returnsundefined. - ftruncatef
Truncates the file descriptor. No arguments other than a possible exception are given to the completion callback.
- ftruncateSyncf
Truncates the file descriptor. Returns
undefined. - futimesf
Change the file system timestamps of the object referenced by the supplied file descriptor. See utimes.
- futimesSyncf
Synchronous version of futimes. Returns
undefined. - globf
Retrieves the files matching the specified pattern.
- globSyncf
Retrieves the files matching the specified pattern.
- lchownf
Set the owner of the symbolic link. No arguments other than a possible exception are given to the completion callback.
- lchownSyncf
Set the owner for the path. Returns
undefined. - linkf
Creates a new link from the
existingPathto thenewPath. See the POSIXlink(2)documentation for more detail. No arguments other than a possible exception are given to the completion callback. - linkSyncf
Creates a new link from the
existingPathto thenewPath. See the POSIXlink(2)documentation for more detail. Returnsundefined. - lstatf
Retrieves the
fs.Statsfor the symbolic link referred to by the path. The callback gets two arguments(err, stats)wherestatsis afs.Statsobject.lstat()is identical tostat(), except that ifpathis a symbolic link, then the link itself is stat-ed, not the file that it refers to. - lutimesf
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.
- lutimesSyncf
Change the file system timestamps of the symbolic link referenced by
path. Returnsundefined, or throws an exception when parameters are incorrect or the operation fails. This is the synchronous version of lutimes. - mkdirf
Asynchronously creates a directory.
- mkdirSyncf
Synchronously creates a directory. Returns
undefined, or ifrecursiveistrue, the first directory path created. This is the synchronous version of mkdir. - mkdtempf
Creates a unique temporary directory.
- mkdtempSyncf
Returns the created directory path.
- openf
Asynchronous file open. See the POSIX
open(2)documentation for more details. - openAsBlobf
Returns a
Blobwhose data is backed by the given file. - opendirf
Asynchronously open a directory. See the POSIX
opendir(3)documentation for more details. - opendirSyncf
Synchronously open a directory. See
opendir(3). - openSyncf
Returns an integer representing the file descriptor.
- promises.accessf
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. - promises.appendFilef
Asynchronously append data to a file, creating the file if it does not yet exist.
datacan be a string or aBuffer. - promises.chmodf
Changes the permissions of a file.
- promises.chownf
Changes the ownership of a file.
- promises.copyFilef
Asynchronously copies
srctodest. By default,destis overwritten if it already exists. - promises.cpf
Asynchronously copies the entire directory structure from
srctodest, including subdirectories and files. - promises.globf
Retrieves the files matching the specified pattern.
- promises.lchownf
Changes the ownership on a symbolic link.
- promises.linkf
Creates a new link from the
existingPathto thenewPath. See the POSIXlink(2)documentation for more detail. - promises.lstatf
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. - promises.lutimesf
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. - promises.mkdirf
Asynchronously creates a directory.
- promises.mkdtempf
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. - promises.openf
Opens a
FileHandle. - promises.opendirf
Asynchronously open a directory for iterative scanning. See the POSIX
opendir(3)documentation for more detail. - promises.readdirf
Reads the contents of a directory.
- promises.readFilef
Asynchronously reads the entire contents of a file.
- promises.readlinkf
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. - promises.realpathf
Determines the actual location of
pathusing the same semantics as thefs.realpath.native()function. - promises.renamef
Renames
oldPathtonewPath. - promises.rmf
Removes files and directories (modeled on the standard POSIX
rmutility). - promises.rmdirf
Removes the directory identified by
path. - promises.statf
- promises.statfsf
- promises.symlinkf
Creates a symbolic link.
- promises.truncatef
Truncates (shortens or extends the length) of the content at
pathtolenbytes. - promises.unlinkf
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. - promises.utimesf
Change the file system timestamps of the object referenced by
path. - promises.watchf
Returns an async iterator that watches for changes on
filename, wherefilenameis either a file or a directory. - promises.writeFilef
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. - readf
Read data from the file specified by
fd. - readdirf
Reads the contents of a directory. The callback gets two arguments
(err, files)wherefilesis an array of the names of the files in the directory excluding'.'and'..'. - readdirSyncf
Reads the contents of the directory.
- readFilef
Asynchronously reads the entire contents of a file.
- readFileSyncf
Returns the contents of the
path. - readlinkf
Reads the contents of the symbolic link referred to by
path. The callback gets two arguments(err, linkString). - readlinkSyncf
Returns the symbolic link's string value.
- readSyncf
Returns the number of
bytesRead. - readvf
Read from a file specified by
fdand write to an array ofArrayBufferViews usingreadv(). - readvSyncf
For detailed information, see the documentation of the asynchronous version of this API: readv.
- realpathfN
Asynchronously computes the canonical pathname by resolving
.,.., and symbolic links. - realpath.nativef
Asynchronous
realpath(3). - realpathSyncfN
Returns the resolved pathname.
- realpathSync.nativef
- renamef
Asynchronously rename file at
oldPathto the pathname provided asnewPath. In the case thatnewPathalready exists, it will be overwritten. If there is a directory atnewPath, an error will be raised instead. No arguments other than a possible exception are given to the completion callback. - renameSyncf
Renames the file from
oldPathtonewPath. Returnsundefined. - rmf
Asynchronously removes files and directories (modeled on the standard POSIX
rmutility). No arguments other than a possible exception are given to the completion callback. - rmdirf
Asynchronous
rmdir(2). No arguments other than a possible exception are given to the completion callback. - rmdirSyncf
Synchronous
rmdir(2). Returnsundefined. - rmSyncf
Synchronously removes files and directories (modeled on the standard POSIX
rmutility). Returnsundefined. - statf
Asynchronous
stat(2). The callback gets two arguments(err, stats)wherestatsis anfs.Statsobject. - statfsf
Asynchronous
statfs(2). Returns information about the mounted file system which containspath. The callback gets two arguments(err, stats)wherestatsis anfs.StatFsobject. - statfsSyncf
Synchronous
statfs(2). Returns information about the mounted file system which containspath. - symlinkfN
Creates the link called
pathpointing totarget. No arguments other than a possible exception are given to the completion callback. - symlinkSyncf
Returns
undefined. - truncatef
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. - truncateSyncf
Truncates the file. Returns
undefined. A file descriptor can also be passed as the first argument. In this case,fs.ftruncateSync()is called. - unlinkf
Asynchronously removes a file or symbolic link. No arguments other than a possible exception are given to the completion callback.
- unlinkSyncf
Synchronous
unlink(2). Returnsundefined. - unwatchFilef
Stop watching for changes on
filename. Iflisteneris specified, only that particular listener is removed. Otherwise, all listeners are removed, effectively stopping watching offilename. - utimesf
Change the file system timestamps of the object referenced by
path. - utimesSyncf
Returns
undefined. - watchf
Watch for changes on
filename, wherefilenameis either a file or a directory. - watchFilef
Watch for changes on
filename. The callbacklistenerwill be called each time the file is accessed. - writef
Write
bufferto the file specified byfd. - writeFilef
- writeFileSyncf
- writeSyncf
For detailed information, see the documentation of the asynchronous version of this API: write.
- writevf
Write an array of
ArrayBufferViews to the file specified byfdusingwritev(). - writevSyncf
For detailed information, see the documentation of the asynchronous version of this API: writev.
- existsf
Test whether or not the given path exists by checking with the file system. Then call the
callbackargument with either true or false: - lchmodf
Changes the permissions on a symbolic link. No arguments other than a possible exception are given to the completion callback.
- lchmodSyncf
Changes the permissions on a symbolic link. Returns
undefined. - promises.lchmodf
- _GlobOptionsI
- BigIntOptionsI
- BigIntStatsI
- BigIntStatsFsI
- CopyOptionsI
- CopyOptionsBaseI
- CopySyncOptionsI
- CreateReadStreamFSImplementationI
- CreateWriteStreamFSImplementationI
- FSImplementationI
- FSWatcherI
- GlobOptionsI
- GlobOptionsWithFileTypesI
- GlobOptionsWithoutFileTypesI
- MakeDirectoryOptionsI
- ObjectEncodingOptionsI
- OpenAsBlobOptionsI
- OpenDirOptionsI
- promises.CreateReadStreamOptionsI
- promises.CreateWriteStreamOptionsI
- promises.FileChangeInfoI
- promises.FileHandleI
- promises.FileReadOptionsI
- promises.FileReadResultI
- promises.FlagAndOpenModeI
- promises.ReadableWebStreamOptionsI
- ReadAsyncOptionsI
- ReadStreamOptionsI
- ReadSyncOptionsI
- ReadVResultI
- RmDirOptionsI
- RmOptionsI
- StatFsOptionsI
- StatOptionsI
- StatscI
A
fs.Statsobject provides information about a file. - StatsBaseI
- StatsFscI
Provides information about a mounted file system.
- StatsFsBaseI
- StatSyncFnI
- StatSyncOptionsI
- StatWatcherI
Class: fs.StatWatcher
- StreamOptionsI
- WatchFileOptionsI
Watch for changes on
filename. The callbacklistenerwill be called each time the file is accessed. - WatchOptionsI
- WriteStreamOptionsI
- WriteVResultI
- constantsN
- promisesN
The
fs/promisesAPI provides asynchronous file system methods that return promises. - BigIntStatsListenerT
- BufferEncodingOptionT
- CustomEventsT
string & {} allows to allow any kind of strings for the event but still allows to have auto completion for the normal events.
- EncodingOptionT
- ModeT
- NoParamCallbackT
- OpenModeT
- PathLikeT
Valid types for path values in "fs".
- PathOrFileDescriptorT
- ReadPositionT
- ReadStreamEventsT
The Keys are events of the ReadStream and the values are the functions that are called when the event is emitted.
- StatsListenerT
- symlink.TypeT
- TimeLikeT
- WatchEventTypeT
- WatchListenerT
- WriteFileOptionsT
- WriteStreamEventsT
The Keys are events of the WriteStream and the values are the functions that are called when the event is emitted.
- constants.COPYFILE_EXCLv
Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists.
- constants.COPYFILE_FICLONEv
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.
- constants.COPYFILE_FICLONE_FORCEv
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.
- constants.F_OKv
Constant for fs.access(). File is visible to the calling process.
- constants.O_APPENDv
Constant for fs.open(). Flag indicating that data will be appended to the end of the file.
- constants.O_CREATv
Constant for fs.open(). Flag indicating to create the file if it does not already exist.
- constants.O_DIRECTv
Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O.
- constants.O_DIRECTORYv
Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory.
- constants.O_DSYNCv
Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity.
- constants.O_EXCLv
Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists.
- constants.O_NOATIMEv
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.
- constants.O_NOCTTYv
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).
- constants.O_NOFOLLOWv
Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link.
- constants.O_NONBLOCKv
Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible.
- constants.O_RDONLYv
Constant for fs.open(). Flag indicating to open a file for read-only access.
- constants.O_RDWRv
Constant for fs.open(). Flag indicating to open a file for read-write access.
- constants.O_SYMLINKv
Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to.
- constants.O_SYNCv
Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O.
- constants.O_TRUNCv
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.
- constants.O_WRONLYv
Constant for fs.open(). Flag indicating to open a file for write-only access.
- constants.R_OKv
Constant for fs.access(). File can be read by the calling process.
- constants.S_IFBLKv
Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file.
- constants.S_IFCHRv
Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file.
- constants.S_IFDIRv
Constant for fs.Stats mode property for determining a file's type. File type constant for a directory.
- constants.S_IFIFOv
Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe.
- constants.S_IFLNKv
Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link.
- constants.S_IFMTv
Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code.
- constants.S_IFREGv
Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file.
- constants.S_IFSOCKv
Constant for fs.Stats mode property for determining a file's type. File type constant for a socket.
- constants.S_IRGRPv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group.
- constants.S_IROTHv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others.
- constants.S_IRUSRv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner.
- constants.S_IRWXGv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group.
- constants.S_IRWXOv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others.
- constants.S_IRWXUv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner.
- constants.S_IWGRPv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group.
- constants.S_IWOTHv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others.
- constants.S_IWUSRv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner.
- constants.S_IXGRPv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group.
- constants.S_IXOTHv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others.
- constants.S_IXUSRv
Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner.
- constants.UV_FS_O_FILEMAPv
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.
- constants.W_OKv
Constant for fs.access(). File can be written by the calling process.
- constants.X_OKv
Constant for fs.access(). File can be executed by the calling process.
- lstatSyncv
Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
- promises.constantsv
- statSyncv
Synchronous stat(2) - Get file status.
node:fs/promises
- accessf
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. - appendFilef
Asynchronously append data to a file, creating the file if it does not yet exist.
datacan be a string or aBuffer. - chmodf
Changes the permissions of a file.
- chownf
Changes the ownership of a file.
- copyFilef
Asynchronously copies
srctodest. By default,destis overwritten if it already exists. - cpf
Asynchronously copies the entire directory structure from
srctodest, including subdirectories and files. - globf
Retrieves the files matching the specified pattern.
- lchownf
Changes the ownership on a symbolic link.
- linkf
Creates a new link from the
existingPathto thenewPath. See the POSIXlink(2)documentation for more detail. - lstatf
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. - lutimesf
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. - mkdirf
Asynchronously creates a directory.
- mkdtempf
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. - openf
Opens a
FileHandle. - opendirf
Asynchronously open a directory for iterative scanning. See the POSIX
opendir(3)documentation for more detail. - readdirf
Reads the contents of a directory.
- readFilef
Asynchronously reads the entire contents of a file.
- readlinkf
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. - realpathf
Determines the actual location of
pathusing the same semantics as thefs.realpath.native()function. - renamef
Renames
oldPathtonewPath. - rmf
Removes files and directories (modeled on the standard POSIX
rmutility). - rmdirf
Removes the directory identified by
path. - statf
- statfsf
- symlinkf
Creates a symbolic link.
- truncatef
Truncates (shortens or extends the length) of the content at
pathtolenbytes. - unlinkf
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. - utimesf
Change the file system timestamps of the object referenced by
path. - watchf
Returns an async iterator that watches for changes on
filename, wherefilenameis either a file or a directory. - writeFilef
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. - lchmodf
- CreateReadStreamOptionsI
- CreateWriteStreamOptionsI
- FileChangeInfoI
- FileHandleI
- FileReadOptionsI
- FileReadResultI
- FlagAndOpenModeI
- ReadableWebStreamOptionsI
- constantsv
node:http
- Agentc
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. - ClientRequestc
- IncomingMessagec
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. - OutgoingMessagec
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.
- Serverc
- ServerResponsec
This object is created internally by an HTTP server, not by the user. It is passed as the second parameter to the
'request'event. - createServerf
Returns a new instance of Server.
- getf
- requestf
- setMaxIdleHTTPParsersf
Set the maximum number of idle HTTP parsers.
- validateHeaderNamef
Performs the low-level validations on the provided
namethat are done whenres.setHeader(name, value)is called. - validateHeaderValuef
Performs the low-level validations on the provided
valuethat are done whenres.setHeader(name, value)is called. - AgentOptionsI
- ClientRequestArgsI
- IncomingHttpHeadersI
- InformationEventI
- OutgoingHttpHeadersI
- RequestOptionsI
- ServerOptionsI
- OutgoingHttpHeaderT
- RequestListenerT
- CloseEventv
- globalAgentv
Global instance of
Agentwhich is used as the default for all HTTP client requests. Diverges from a defaultAgentconfiguration by havingkeepAliveenabled and atimeoutof 5 seconds. - maxHeaderSizev
Read-only property specifying the maximum allowed size of HTTP headers in bytes. Defaults to 16KB. Configurable using the
--max-http-header-sizeCLI option. - MessageEventv
- METHODSv
- STATUS_CODESv
- WebSocketv
A browser-compatible implementation of WebSocket.
node:http2
- Http2ServerRequestc
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. - Http2ServerResponsec
This object is created internally by an HTTP server, not by the user. It is passed as the second parameter to the
'request'event. - connectf
Returns a
ClientHttp2Sessioninstance. - createSecureServerf
Returns a
tls.Serverinstance that creates and managesHttp2Sessioninstances. - createServerf
Returns a
net.Serverinstance that creates and managesHttp2Sessioninstances. - getDefaultSettingsf
- getPackedSettingsf
- getUnpackedSettingsf
- performServerHandshakef
Create an HTTP/2 server session from an existing socket.
- AlternativeServiceOptionsI
- ClientHttp2SessionI
- ClientHttp2StreamI
- ClientSessionOptionsI
- ClientSessionRequestOptionsI
- Http2SecureServerI
- Http2ServerI
- HTTP2ServerCommonI
- Http2SessionI
- Http2StreamI
- IncomingHttpHeadersI
- IncomingHttpStatusHeaderI
- OutgoingHttpHeadersI
- SecureClientSessionOptionsI
- SecureServerOptionsI
- SecureServerSessionOptionsI
- ServerHttp2SessionI
- ServerHttp2StreamI
- ServerOptionsI
- ServerSessionOptionsI
- ServerStreamFileResponseOptionsI
- ServerStreamFileResponseOptionsWithErrorI
- ServerStreamResponseOptionsI
- SessionOptionsI
- SessionStateI
- SettingsI
- StatOptionsI
- StreamPriorityOptionsI
- StreamStateI
- constantsN
- constants.DEFAULT_SETTINGS_ENABLE_PUSHv
- constants.DEFAULT_SETTINGS_HEADER_TABLE_SIZEv
- constants.DEFAULT_SETTINGS_INITIAL_WINDOW_SIZEv
- constants.DEFAULT_SETTINGS_MAX_FRAME_SIZEv
- constants.HTTP2_HEADER_ACCEPTv
- constants.HTTP2_HEADER_ACCEPT_CHARSETv
- constants.HTTP2_HEADER_ACCEPT_ENCODINGv
- constants.HTTP2_HEADER_ACCEPT_LANGUAGEv
- constants.HTTP2_HEADER_ACCEPT_RANGESv
- constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALSv
- constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERSv
- constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODSv
- constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGINv
- constants.HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERSv
- constants.HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERSv
- constants.HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHODv
- constants.HTTP2_HEADER_AGEv
- constants.HTTP2_HEADER_ALLOWv
- constants.HTTP2_HEADER_AUTHORITYv
- constants.HTTP2_HEADER_AUTHORIZATIONv
- constants.HTTP2_HEADER_CACHE_CONTROLv
- constants.HTTP2_HEADER_CONNECTIONv
- constants.HTTP2_HEADER_CONTENT_DISPOSITIONv
- constants.HTTP2_HEADER_CONTENT_ENCODINGv
- constants.HTTP2_HEADER_CONTENT_LANGUAGEv
- constants.HTTP2_HEADER_CONTENT_LENGTHv
- constants.HTTP2_HEADER_CONTENT_LOCATIONv
- constants.HTTP2_HEADER_CONTENT_MD5v
- constants.HTTP2_HEADER_CONTENT_RANGEv
- constants.HTTP2_HEADER_CONTENT_TYPEv
- constants.HTTP2_HEADER_COOKIEv
- constants.HTTP2_HEADER_DATEv
- constants.HTTP2_HEADER_ETAGv
- constants.HTTP2_HEADER_EXPECTv
- constants.HTTP2_HEADER_EXPIRESv
- constants.HTTP2_HEADER_FROMv
- constants.HTTP2_HEADER_HOSTv
- constants.HTTP2_HEADER_HTTP2_SETTINGSv
- constants.HTTP2_HEADER_IF_MATCHv
- constants.HTTP2_HEADER_IF_MODIFIED_SINCEv
- constants.HTTP2_HEADER_IF_NONE_MATCHv
- constants.HTTP2_HEADER_IF_RANGEv
- constants.HTTP2_HEADER_IF_UNMODIFIED_SINCEv
- constants.HTTP2_HEADER_KEEP_ALIVEv
- constants.HTTP2_HEADER_LAST_MODIFIEDv
- constants.HTTP2_HEADER_LINKv
- constants.HTTP2_HEADER_LOCATIONv
- constants.HTTP2_HEADER_MAX_FORWARDSv
- constants.HTTP2_HEADER_METHODv
- constants.HTTP2_HEADER_PATHv
- constants.HTTP2_HEADER_PREFERv
- constants.HTTP2_HEADER_PROXY_AUTHENTICATEv
- constants.HTTP2_HEADER_PROXY_AUTHORIZATIONv
- constants.HTTP2_HEADER_PROXY_CONNECTIONv
- constants.HTTP2_HEADER_RANGEv
- constants.HTTP2_HEADER_REFERERv
- constants.HTTP2_HEADER_REFRESHv
- constants.HTTP2_HEADER_RETRY_AFTERv
- constants.HTTP2_HEADER_SCHEMEv
- constants.HTTP2_HEADER_SERVERv
- constants.HTTP2_HEADER_SET_COOKIEv
- constants.HTTP2_HEADER_STATUSv
- constants.HTTP2_HEADER_STRICT_TRANSPORT_SECURITYv
- constants.HTTP2_HEADER_TEv
- constants.HTTP2_HEADER_TRANSFER_ENCODINGv
- constants.HTTP2_HEADER_UPGRADEv
- constants.HTTP2_HEADER_USER_AGENTv
- constants.HTTP2_HEADER_VARYv
- constants.HTTP2_HEADER_VIAv
- constants.HTTP2_HEADER_WWW_AUTHENTICATEv
- constants.HTTP2_METHOD_ACLv
- constants.HTTP2_METHOD_BASELINE_CONTROLv
- constants.HTTP2_METHOD_BINDv
- constants.HTTP2_METHOD_CHECKINv
- constants.HTTP2_METHOD_CHECKOUTv
- constants.HTTP2_METHOD_CONNECTv
- constants.HTTP2_METHOD_COPYv
- constants.HTTP2_METHOD_DELETEv
- constants.HTTP2_METHOD_GETv
- constants.HTTP2_METHOD_HEADv
- constants.HTTP2_METHOD_LABELv
- constants.HTTP2_METHOD_LINKv
- constants.HTTP2_METHOD_LOCKv
- constants.HTTP2_METHOD_MERGEv
- constants.HTTP2_METHOD_MKACTIVITYv
- constants.HTTP2_METHOD_MKCALENDARv
- constants.HTTP2_METHOD_MKCOLv
- constants.HTTP2_METHOD_MKREDIRECTREFv
- constants.HTTP2_METHOD_MKWORKSPACEv
- constants.HTTP2_METHOD_MOVEv
- constants.HTTP2_METHOD_OPTIONSv
- constants.HTTP2_METHOD_ORDERPATCHv
- constants.HTTP2_METHOD_PATCHv
- constants.HTTP2_METHOD_POSTv
- constants.HTTP2_METHOD_PRIv
- constants.HTTP2_METHOD_PROPFINDv
- constants.HTTP2_METHOD_PROPPATCHv
- constants.HTTP2_METHOD_PUTv
- constants.HTTP2_METHOD_REBINDv
- constants.HTTP2_METHOD_REPORTv
- constants.HTTP2_METHOD_SEARCHv
- constants.HTTP2_METHOD_TRACEv
- constants.HTTP2_METHOD_UNBINDv
- constants.HTTP2_METHOD_UNCHECKOUTv
- constants.HTTP2_METHOD_UNLINKv
- constants.HTTP2_METHOD_UNLOCKv
- constants.HTTP2_METHOD_UPDATEv
- constants.HTTP2_METHOD_UPDATEREDIRECTREFv
- constants.HTTP2_METHOD_VERSION_CONTROLv
- constants.HTTP_STATUS_ACCEPTEDv
- constants.HTTP_STATUS_ALREADY_REPORTEDv
- constants.HTTP_STATUS_BAD_GATEWAYv
- constants.HTTP_STATUS_BAD_REQUESTv
- constants.HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDEDv
- constants.HTTP_STATUS_CONFLICTv
- constants.HTTP_STATUS_CONTINUEv
- constants.HTTP_STATUS_CREATEDv
- constants.HTTP_STATUS_EXPECTATION_FAILEDv
- constants.HTTP_STATUS_FAILED_DEPENDENCYv
- constants.HTTP_STATUS_FORBIDDENv
- constants.HTTP_STATUS_FOUNDv
- constants.HTTP_STATUS_GATEWAY_TIMEOUTv
- constants.HTTP_STATUS_GONEv
- constants.HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTEDv
- constants.HTTP_STATUS_IM_USEDv
- constants.HTTP_STATUS_INSUFFICIENT_STORAGEv
- constants.HTTP_STATUS_INTERNAL_SERVER_ERRORv
- constants.HTTP_STATUS_LENGTH_REQUIREDv
- constants.HTTP_STATUS_LOCKEDv
- constants.HTTP_STATUS_LOOP_DETECTEDv
- constants.HTTP_STATUS_METHOD_NOT_ALLOWEDv
- constants.HTTP_STATUS_MISDIRECTED_REQUESTv
- constants.HTTP_STATUS_MOVED_PERMANENTLYv
- constants.HTTP_STATUS_MULTI_STATUSv
- constants.HTTP_STATUS_MULTIPLE_CHOICESv
- constants.HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIREDv
- constants.HTTP_STATUS_NO_CONTENTv
- constants.HTTP_STATUS_NON_AUTHORITATIVE_INFORMATIONv
- constants.HTTP_STATUS_NOT_ACCEPTABLEv
- constants.HTTP_STATUS_NOT_EXTENDEDv
- constants.HTTP_STATUS_NOT_FOUNDv
- constants.HTTP_STATUS_NOT_IMPLEMENTEDv
- constants.HTTP_STATUS_NOT_MODIFIEDv
- constants.HTTP_STATUS_OKv
- constants.HTTP_STATUS_PARTIAL_CONTENTv
- constants.HTTP_STATUS_PAYLOAD_TOO_LARGEv
- constants.HTTP_STATUS_PAYMENT_REQUIREDv
- constants.HTTP_STATUS_PERMANENT_REDIRECTv
- constants.HTTP_STATUS_PRECONDITION_FAILEDv
- constants.HTTP_STATUS_PRECONDITION_REQUIREDv
- constants.HTTP_STATUS_PROCESSINGv
- constants.HTTP_STATUS_PROXY_AUTHENTICATION_REQUIREDv
- constants.HTTP_STATUS_RANGE_NOT_SATISFIABLEv
- constants.HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGEv
- constants.HTTP_STATUS_REQUEST_TIMEOUTv
- constants.HTTP_STATUS_RESET_CONTENTv
- constants.HTTP_STATUS_SEE_OTHERv
- constants.HTTP_STATUS_SERVICE_UNAVAILABLEv
- constants.HTTP_STATUS_SWITCHING_PROTOCOLSv
- constants.HTTP_STATUS_TEAPOTv
- constants.HTTP_STATUS_TEMPORARY_REDIRECTv
- constants.HTTP_STATUS_TOO_MANY_REQUESTSv
- constants.HTTP_STATUS_UNAUTHORIZEDv
- constants.HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONSv
- constants.HTTP_STATUS_UNORDERED_COLLECTIONv
- constants.HTTP_STATUS_UNPROCESSABLE_ENTITYv
- constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPEv
- constants.HTTP_STATUS_UPGRADE_REQUIREDv
- constants.HTTP_STATUS_URI_TOO_LONGv
- constants.HTTP_STATUS_USE_PROXYv
- constants.HTTP_STATUS_VARIANT_ALSO_NEGOTIATESv
- constants.MAX_INITIAL_WINDOW_SIZEv
- constants.MAX_MAX_FRAME_SIZEv
- constants.MIN_MAX_FRAME_SIZEv
- constants.NGHTTP2_CANCELv
- constants.NGHTTP2_COMPRESSION_ERRORv
- constants.NGHTTP2_CONNECT_ERRORv
- constants.NGHTTP2_DEFAULT_WEIGHTv
- constants.NGHTTP2_ENHANCE_YOUR_CALMv
- constants.NGHTTP2_ERR_FRAME_SIZE_ERRORv
- constants.NGHTTP2_FLAG_ACKv
- constants.NGHTTP2_FLAG_END_HEADERSv
- constants.NGHTTP2_FLAG_END_STREAMv
- constants.NGHTTP2_FLAG_NONEv
- constants.NGHTTP2_FLAG_PADDEDv
- constants.NGHTTP2_FLAG_PRIORITYv
- constants.NGHTTP2_FLOW_CONTROL_ERRORv
- constants.NGHTTP2_FRAME_SIZE_ERRORv
- constants.NGHTTP2_HTTP_1_1_REQUIREDv
- constants.NGHTTP2_INADEQUATE_SECURITYv
- constants.NGHTTP2_INTERNAL_ERRORv
- constants.NGHTTP2_NO_ERRORv
- constants.NGHTTP2_PROTOCOL_ERRORv
- constants.NGHTTP2_REFUSED_STREAMv
- constants.NGHTTP2_SESSION_CLIENTv
- constants.NGHTTP2_SESSION_SERVERv
- constants.NGHTTP2_SETTINGS_ENABLE_PUSHv
- constants.NGHTTP2_SETTINGS_HEADER_TABLE_SIZEv
- constants.NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZEv
- constants.NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMSv
- constants.NGHTTP2_SETTINGS_MAX_FRAME_SIZEv
- constants.NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZEv
- constants.NGHTTP2_SETTINGS_TIMEOUTv
- constants.NGHTTP2_STREAM_CLOSEDv
- constants.NGHTTP2_STREAM_STATE_CLOSEDv
- constants.NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCALv
- constants.NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTEv
- constants.NGHTTP2_STREAM_STATE_IDLEv
- constants.NGHTTP2_STREAM_STATE_OPENv
- constants.NGHTTP2_STREAM_STATE_RESERVED_LOCALv
- constants.NGHTTP2_STREAM_STATE_RESERVED_REMOTEv
- constants.PADDING_STRATEGY_CALLBACKv
- constants.PADDING_STRATEGY_MAXv
- constants.PADDING_STRATEGY_NONEv
- sensitiveHeadersv
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
- Agentc
An
Agentobject for HTTPS similar tohttp.Agent. See request for more information. - createServerf
Or
- getf
Like
http.get()but for HTTPS. - requestf
Makes a request to a secure web server.
- AgentOptionsI
- ServercI
- RequestOptionsT
- ServerOptionsT
- globalAgentv
node:inspector
- Sessionc
The
inspector.Sessionis used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. - closef
Deactivate the inspector. Blocks until there are no active connections.
- Network.loadingFailedf
This feature is only available with the
--experimental-network-inspectionflag enabled. - Network.loadingFinishedf
This feature is only available with the
--experimental-network-inspectionflag enabled. - Network.requestWillBeSentf
This feature is only available with the
--experimental-network-inspectionflag enabled. - Network.responseReceivedf
This feature is only available with the
--experimental-network-inspectionflag enabled. - openf
Activate inspector on host and port. Equivalent to
node --inspect=[[host:]port], but can be done programmatically after node has started. - urlf
Return the URL of the active inspector, or
undefinedif there is none. - waitForDebuggerf
Blocks until a client (existing or connected later) has sent
Runtime.runIfWaitingForDebuggercommand. - Console.ConsoleMessageI
Console message.
- Console.MessageAddedEventDataTypeI
- Debugger.BreakLocationI
- Debugger.BreakpointResolvedEventDataTypeI
- Debugger.CallFrameI
JavaScript call frame. Array of call frames form the call stack.
- Debugger.ContinueToLocationParameterTypeI
- Debugger.EnableReturnTypeI
- Debugger.EvaluateOnCallFrameParameterTypeI
- Debugger.EvaluateOnCallFrameReturnTypeI
- Debugger.GetPossibleBreakpointsParameterTypeI
- Debugger.GetPossibleBreakpointsReturnTypeI
- Debugger.GetScriptSourceParameterTypeI
- Debugger.GetScriptSourceReturnTypeI
- Debugger.GetStackTraceParameterTypeI
- Debugger.GetStackTraceReturnTypeI
- Debugger.LocationI
Location in the source code.
- Debugger.PausedEventDataTypeI
- Debugger.PauseOnAsyncCallParameterTypeI
- Debugger.RemoveBreakpointParameterTypeI
- Debugger.RestartFrameParameterTypeI
- Debugger.RestartFrameReturnTypeI
- Debugger.ScopeI
Scope description.
- Debugger.ScriptFailedToParseEventDataTypeI
- Debugger.ScriptParsedEventDataTypeI
- Debugger.ScriptPositionI
Location in the source code.
- Debugger.SearchInContentParameterTypeI
- Debugger.SearchInContentReturnTypeI
- Debugger.SearchMatchI
Search match for resource.
- Debugger.SetAsyncCallStackDepthParameterTypeI
- Debugger.SetBlackboxedRangesParameterTypeI
- Debugger.SetBlackboxPatternsParameterTypeI
- Debugger.SetBreakpointByUrlParameterTypeI
- Debugger.SetBreakpointByUrlReturnTypeI
- Debugger.SetBreakpointParameterTypeI
- Debugger.SetBreakpointReturnTypeI
- Debugger.SetBreakpointsActiveParameterTypeI
- Debugger.SetPauseOnExceptionsParameterTypeI
- Debugger.SetReturnValueParameterTypeI
- Debugger.SetScriptSourceParameterTypeI
- Debugger.SetScriptSourceReturnTypeI
- Debugger.SetSkipAllPausesParameterTypeI
- Debugger.SetVariableValueParameterTypeI
- Debugger.StepIntoParameterTypeI
- HeapProfiler.AddHeapSnapshotChunkEventDataTypeI
- HeapProfiler.AddInspectedHeapObjectParameterTypeI
- HeapProfiler.GetHeapObjectIdParameterTypeI
- HeapProfiler.GetHeapObjectIdReturnTypeI
- HeapProfiler.GetObjectByHeapObjectIdParameterTypeI
- HeapProfiler.GetObjectByHeapObjectIdReturnTypeI
- HeapProfiler.GetSamplingProfileReturnTypeI
- HeapProfiler.HeapStatsUpdateEventDataTypeI
- HeapProfiler.LastSeenObjectIdEventDataTypeI
- HeapProfiler.ReportHeapSnapshotProgressEventDataTypeI
- HeapProfiler.SamplingHeapProfileI
Profile.
- HeapProfiler.SamplingHeapProfileNodeI
Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
- HeapProfiler.StartSamplingParameterTypeI
- HeapProfiler.StartTrackingHeapObjectsParameterTypeI
- HeapProfiler.StopSamplingReturnTypeI
- HeapProfiler.StopTrackingHeapObjectsParameterTypeI
- HeapProfiler.TakeHeapSnapshotParameterTypeI
- InspectorConsoleI
- InspectorNotificationI
- Network.HeadersI
Request / response headers as keys / values of JSON object.
- Network.LoadingFailedEventDataTypeI
- Network.LoadingFinishedEventDataTypeI
- Network.RequestI
HTTP request data.
- Network.RequestWillBeSentEventDataTypeI
- Network.ResponseI
HTTP response data.
- Network.ResponseReceivedEventDataTypeI
- NodeRuntime.NotifyWhenWaitingForDisconnectParameterTypeI
- NodeTracing.DataCollectedEventDataTypeI
- NodeTracing.GetCategoriesReturnTypeI
- NodeTracing.StartParameterTypeI
- NodeTracing.TraceConfigI
- NodeWorker.AttachedToWorkerEventDataTypeI
- NodeWorker.DetachedFromWorkerEventDataTypeI
- NodeWorker.DetachParameterTypeI
- NodeWorker.EnableParameterTypeI
- NodeWorker.ReceivedMessageFromWorkerEventDataTypeI
- NodeWorker.SendMessageToWorkerParameterTypeI
- NodeWorker.WorkerInfoI
- Profiler.ConsoleProfileFinishedEventDataTypeI
- Profiler.ConsoleProfileStartedEventDataTypeI
- Profiler.CoverageRangeI
Coverage data for a source range.
- Profiler.FunctionCoverageI
Coverage data for a JavaScript function.
- Profiler.GetBestEffortCoverageReturnTypeI
- Profiler.PositionTickInfoI
Specifies a number of samples attributed to a certain source position.
- Profiler.ProfileI
Profile.
- Profiler.ProfileNodeI
Profile node. Holds callsite information, execution statistics and child nodes.
- Profiler.ScriptCoverageI
Coverage data for a JavaScript script.
- Profiler.SetSamplingIntervalParameterTypeI
- Profiler.StartPreciseCoverageParameterTypeI
- Profiler.StopReturnTypeI
- Profiler.TakePreciseCoverageReturnTypeI
- Runtime.AwaitPromiseParameterTypeI
- Runtime.AwaitPromiseReturnTypeI
- Runtime.CallArgumentI
Represents function call argument. Either remote object id
objectId, primitivevalue, unserializable primitive value or neither of (for undefined) them should be specified. - Runtime.CallFrameI
Stack entry for runtime errors and assertions.
- Runtime.CallFunctionOnParameterTypeI
- Runtime.CallFunctionOnReturnTypeI
- Runtime.CompileScriptParameterTypeI
- Runtime.CompileScriptReturnTypeI
- Runtime.ConsoleAPICalledEventDataTypeI
- Runtime.CustomPreviewI
- Runtime.EntryPreviewI
- Runtime.EvaluateParameterTypeI
- Runtime.EvaluateReturnTypeI
- Runtime.ExceptionDetailsI
Detailed information about exception (or error) that was thrown during script compilation or execution.
- Runtime.ExceptionRevokedEventDataTypeI
- Runtime.ExceptionThrownEventDataTypeI
- Runtime.ExecutionContextCreatedEventDataTypeI
- Runtime.ExecutionContextDescriptionI
Description of an isolated world.
- Runtime.ExecutionContextDestroyedEventDataTypeI
- Runtime.GetPropertiesParameterTypeI
- Runtime.GetPropertiesReturnTypeI
- Runtime.GlobalLexicalScopeNamesParameterTypeI
- Runtime.GlobalLexicalScopeNamesReturnTypeI
- Runtime.InspectRequestedEventDataTypeI
- Runtime.InternalPropertyDescriptorI
Object internal property descriptor. This property isn't normally visible in JavaScript code.
- Runtime.ObjectPreviewI
Object containing abbreviated remote object value.
- Runtime.PropertyDescriptorI
Object property descriptor.
- Runtime.PropertyPreviewI
- Runtime.QueryObjectsParameterTypeI
- Runtime.QueryObjectsReturnTypeI
- Runtime.ReleaseObjectGroupParameterTypeI
- Runtime.ReleaseObjectParameterTypeI
- Runtime.RemoteObjectI
Mirror object referencing original JavaScript object.
- Runtime.RunScriptParameterTypeI
- Runtime.RunScriptReturnTypeI
- Runtime.SetCustomObjectFormatterEnabledParameterTypeI
- Runtime.StackTraceI
Call frames for assertions or error messages.
- Runtime.StackTraceIdI
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.DomainI
Description of the protocol domain.
- Schema.GetDomainsReturnTypeI
- ConsoleN
- DebuggerN
- HeapProfilerN
- NetworkN
- NodeRuntimeN
- NodeTracingN
- NodeWorkerN
- ProfilerN
- RuntimeN
- SchemaN
- Debugger.BreakpointIdT
Breakpoint identifier.
- Debugger.CallFrameIdT
Call frame identifier.
- HeapProfiler.HeapSnapshotObjectIdT
Heap snapshot object id.
- Network.MonotonicTimeT
Monotonically increasing time in seconds since an arbitrary point in the past.
- Network.RequestIdT
Unique request identifier.
- Network.ResourceTypeT
Resource type as it was perceived by the rendering engine.
- Network.TimeSinceEpochT
UTC time in seconds, counted from January 1, 1970.
- NodeWorker.SessionIDT
Unique identifier of attached debugging session.
- NodeWorker.WorkerIDT
- Runtime.ExecutionContextIdT
Id of an execution context.
- Runtime.RemoteObjectIdT
Unique object identifier.
- Runtime.ScriptIdT
Unique script identifier.
- Runtime.TimestampT
Number of milliseconds since epoch.
- Runtime.UniqueDebuggerIdT
Unique identifier of current debugger.
- Runtime.UnserializableValueT
Primitive value which cannot be JSON-stringified.
- consolev
An object to send messages to the remote inspector console.
node:inspector/promises
- Sessionc
The
inspector.Sessionis used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. - closef
Deactivate the inspector. Blocks until there are no active connections.
- Network.loadingFailedf
This feature is only available with the
--experimental-network-inspectionflag enabled. - Network.loadingFinishedf
This feature is only available with the
--experimental-network-inspectionflag enabled. - Network.requestWillBeSentf
This feature is only available with the
--experimental-network-inspectionflag enabled. - Network.responseReceivedf
This feature is only available with the
--experimental-network-inspectionflag enabled. - openf
Activate inspector on host and port. Equivalent to
node --inspect=[[host:]port], but can be done programmatically after node has started. - urlf
Return the URL of the active inspector, or
undefinedif there is none. - waitForDebuggerf
Blocks until a client (existing or connected later) has sent
Runtime.runIfWaitingForDebuggercommand. - Console.ConsoleMessageI
Console message.
- Console.MessageAddedEventDataTypeI
- Debugger.BreakLocationI
- Debugger.BreakpointResolvedEventDataTypeI
- Debugger.CallFrameI
JavaScript call frame. Array of call frames form the call stack.
- Debugger.ContinueToLocationParameterTypeI
- Debugger.EnableReturnTypeI
- Debugger.EvaluateOnCallFrameParameterTypeI
- Debugger.EvaluateOnCallFrameReturnTypeI
- Debugger.GetPossibleBreakpointsParameterTypeI
- Debugger.GetPossibleBreakpointsReturnTypeI
- Debugger.GetScriptSourceParameterTypeI
- Debugger.GetScriptSourceReturnTypeI
- Debugger.GetStackTraceParameterTypeI
- Debugger.GetStackTraceReturnTypeI
- Debugger.LocationI
Location in the source code.
- Debugger.PausedEventDataTypeI
- Debugger.PauseOnAsyncCallParameterTypeI
- Debugger.RemoveBreakpointParameterTypeI
- Debugger.RestartFrameParameterTypeI
- Debugger.RestartFrameReturnTypeI
- Debugger.ScopeI
Scope description.
- Debugger.ScriptFailedToParseEventDataTypeI
- Debugger.ScriptParsedEventDataTypeI
- Debugger.ScriptPositionI
Location in the source code.
- Debugger.SearchInContentParameterTypeI
- Debugger.SearchInContentReturnTypeI
- Debugger.SearchMatchI
Search match for resource.
- Debugger.SetAsyncCallStackDepthParameterTypeI
- Debugger.SetBlackboxedRangesParameterTypeI
- Debugger.SetBlackboxPatternsParameterTypeI
- Debugger.SetBreakpointByUrlParameterTypeI
- Debugger.SetBreakpointByUrlReturnTypeI
- Debugger.SetBreakpointParameterTypeI
- Debugger.SetBreakpointReturnTypeI
- Debugger.SetBreakpointsActiveParameterTypeI
- Debugger.SetPauseOnExceptionsParameterTypeI
- Debugger.SetReturnValueParameterTypeI
- Debugger.SetScriptSourceParameterTypeI
- Debugger.SetScriptSourceReturnTypeI
- Debugger.SetSkipAllPausesParameterTypeI
- Debugger.SetVariableValueParameterTypeI
- Debugger.StepIntoParameterTypeI
- HeapProfiler.AddHeapSnapshotChunkEventDataTypeI
- HeapProfiler.AddInspectedHeapObjectParameterTypeI
- HeapProfiler.GetHeapObjectIdParameterTypeI
- HeapProfiler.GetHeapObjectIdReturnTypeI
- HeapProfiler.GetObjectByHeapObjectIdParameterTypeI
- HeapProfiler.GetObjectByHeapObjectIdReturnTypeI
- HeapProfiler.GetSamplingProfileReturnTypeI
- HeapProfiler.HeapStatsUpdateEventDataTypeI
- HeapProfiler.LastSeenObjectIdEventDataTypeI
- HeapProfiler.ReportHeapSnapshotProgressEventDataTypeI
- HeapProfiler.SamplingHeapProfileI
Profile.
- HeapProfiler.SamplingHeapProfileNodeI
Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
- HeapProfiler.StartSamplingParameterTypeI
- HeapProfiler.StartTrackingHeapObjectsParameterTypeI
- HeapProfiler.StopSamplingReturnTypeI
- HeapProfiler.StopTrackingHeapObjectsParameterTypeI
- HeapProfiler.TakeHeapSnapshotParameterTypeI
- InspectorNotificationI
- Network.HeadersI
Request / response headers as keys / values of JSON object.
- Network.LoadingFailedEventDataTypeI
- Network.LoadingFinishedEventDataTypeI
- Network.RequestI
HTTP request data.
- Network.RequestWillBeSentEventDataTypeI
- Network.ResponseI
HTTP response data.
- Network.ResponseReceivedEventDataTypeI
- NodeRuntime.NotifyWhenWaitingForDisconnectParameterTypeI
- NodeTracing.DataCollectedEventDataTypeI
- NodeTracing.GetCategoriesReturnTypeI
- NodeTracing.StartParameterTypeI
- NodeTracing.TraceConfigI
- NodeWorker.AttachedToWorkerEventDataTypeI
- NodeWorker.DetachedFromWorkerEventDataTypeI
- NodeWorker.DetachParameterTypeI
- NodeWorker.EnableParameterTypeI
- NodeWorker.ReceivedMessageFromWorkerEventDataTypeI
- NodeWorker.SendMessageToWorkerParameterTypeI
- NodeWorker.WorkerInfoI
- Profiler.ConsoleProfileFinishedEventDataTypeI
- Profiler.ConsoleProfileStartedEventDataTypeI
- Profiler.CoverageRangeI
Coverage data for a source range.
- Profiler.FunctionCoverageI
Coverage data for a JavaScript function.
- Profiler.GetBestEffortCoverageReturnTypeI
- Profiler.PositionTickInfoI
Specifies a number of samples attributed to a certain source position.
- Profiler.ProfileI
Profile.
- Profiler.ProfileNodeI
Profile node. Holds callsite information, execution statistics and child nodes.
- Profiler.ScriptCoverageI
Coverage data for a JavaScript script.
- Profiler.SetSamplingIntervalParameterTypeI
- Profiler.StartPreciseCoverageParameterTypeI
- Profiler.StopReturnTypeI
- Profiler.TakePreciseCoverageReturnTypeI
- Runtime.AwaitPromiseParameterTypeI
- Runtime.AwaitPromiseReturnTypeI
- Runtime.CallArgumentI
Represents function call argument. Either remote object id
objectId, primitivevalue, unserializable primitive value or neither of (for undefined) them should be specified. - Runtime.CallFrameI
Stack entry for runtime errors and assertions.
- Runtime.CallFunctionOnParameterTypeI
- Runtime.CallFunctionOnReturnTypeI
- Runtime.CompileScriptParameterTypeI
- Runtime.CompileScriptReturnTypeI
- Runtime.ConsoleAPICalledEventDataTypeI
- Runtime.CustomPreviewI
- Runtime.EntryPreviewI
- Runtime.EvaluateParameterTypeI
- Runtime.EvaluateReturnTypeI
- Runtime.ExceptionDetailsI
Detailed information about exception (or error) that was thrown during script compilation or execution.
- Runtime.ExceptionRevokedEventDataTypeI
- Runtime.ExceptionThrownEventDataTypeI
- Runtime.ExecutionContextCreatedEventDataTypeI
- Runtime.ExecutionContextDescriptionI
Description of an isolated world.
- Runtime.ExecutionContextDestroyedEventDataTypeI
- Runtime.GetPropertiesParameterTypeI
- Runtime.GetPropertiesReturnTypeI
- Runtime.GlobalLexicalScopeNamesParameterTypeI
- Runtime.GlobalLexicalScopeNamesReturnTypeI
- Runtime.InspectRequestedEventDataTypeI
- Runtime.InternalPropertyDescriptorI
Object internal property descriptor. This property isn't normally visible in JavaScript code.
- Runtime.ObjectPreviewI
Object containing abbreviated remote object value.
- Runtime.PropertyDescriptorI
Object property descriptor.
- Runtime.PropertyPreviewI
- Runtime.QueryObjectsParameterTypeI
- Runtime.QueryObjectsReturnTypeI
- Runtime.ReleaseObjectGroupParameterTypeI
- Runtime.ReleaseObjectParameterTypeI
- Runtime.RemoteObjectI
Mirror object referencing original JavaScript object.
- Runtime.RunScriptParameterTypeI
- Runtime.RunScriptReturnTypeI
- Runtime.SetCustomObjectFormatterEnabledParameterTypeI
- Runtime.StackTraceI
Call frames for assertions or error messages.
- Runtime.StackTraceIdI
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.DomainI
Description of the protocol domain.
- Schema.GetDomainsReturnTypeI
- ConsoleN
- DebuggerN
- HeapProfilerN
- NetworkN
- NodeRuntimeN
- NodeTracingN
- NodeWorkerN
- ProfilerN
- RuntimeN
- SchemaN
- Debugger.BreakpointIdT
Breakpoint identifier.
- Debugger.CallFrameIdT
Call frame identifier.
- HeapProfiler.HeapSnapshotObjectIdT
Heap snapshot object id.
- Network.MonotonicTimeT
Monotonically increasing time in seconds since an arbitrary point in the past.
- Network.RequestIdT
Unique request identifier.
- Network.ResourceTypeT
Resource type as it was perceived by the rendering engine.
- Network.TimeSinceEpochT
UTC time in seconds, counted from January 1, 1970.
- NodeWorker.SessionIDT
Unique identifier of attached debugging session.
- NodeWorker.WorkerIDT
- Runtime.ExecutionContextIdT
Id of an execution context.
- Runtime.RemoteObjectIdT
Unique object identifier.
- Runtime.ScriptIdT
Unique script identifier.
- Runtime.TimestampT
Number of milliseconds since epoch.
- Runtime.UniqueDebuggerIdT
Unique identifier of current debugger.
- Runtime.UnserializableValueT
Primitive value which cannot be JSON-stringified.
- consolev
An object to send messages to the remote inspector console.
node:module
- ModulecIN
- Module.SourceMapc
- Module.createRequiref
- Module.enableCompileCachef
Enable module compile cache in the current Node.js instance.
- Module.findPackageJSONf
// /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.findSourceMapf
pathis the resolved path for the file for which a corresponding source map should be fetched. - Module.flushCompileCachef
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.getCompileCacheDirf
- Module.isBuiltinf
- Module.registerf
Register a module that exports hooks that customize Node.js module resolution and loading behavior. See Customization hooks.
- Module.runMainf
- Module.stripTypeScriptTypesf
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.syncBuiltinESMExportsf
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.wrapf
- ImportMetaI
- Module.EnableCompileCacheResultI
- Module.ImportAttributesI
- Module.LoadFnOutputI
- Module.LoadHookContextI
- Module.RegisterOptionsI
- Module.ResolveFnOutputI
- Module.ResolveHookContextI
- Module.SourceMapConstructorOptionsI
- Module.SourceMapPayloadI
- Module.SourceMappingI
- Module.SourceOriginI
- Module.StripTypeScriptTypesOptionsI
- RequireI
- RequireResolveI
- RequireResolveOptionsI
- NodeModuleI
- NodeRequireI
- RequireExtensionsI
- Module.constantsN
- Module.constants.compileCacheStatusN
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.InitializeHookT
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.LoadHookT
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.ModuleFormatT
- Module.ModuleSourceT
- Module.ResolveHookT
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. - __dirnamev
The directory name of the current module. This is the same as the
path.dirname()of the__filename. - __filenamev
The file name of the current module. This is the current module file's absolute path with symlinks resolved.
- exportsv
The
exportsvariable is available within a module's file-level scope, and is assigned the value ofmodule.exportsbefore the module is evaluated. - modulev
A reference to the current module.
- Module.builtinModulesv
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_ENABLEDv
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.DISABLEDv
Node.js cannot enable the compile cache because the environment variable
NODE_DISABLE_COMPILE_CACHE=1has been set. - Module.constants.compileCacheStatus.ENABLEDv
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.FAILEDv
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. - requirev
node:net
- BlockListc
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. - Serverc
This class is used to create a TCP or
IPCserver. - Socketc
- SocketAddressc
- connectf
Aliases to createConnection.
- createConnectionf
A factory function, which creates a new Socket, immediately initiates connection with
socket.connect(), then returns thenet.Socketthat starts the connection. - createServerf
Creates a new TCP or
IPCserver. - getDefaultAutoSelectFamilyf
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. - getDefaultAutoSelectFamilyAttemptTimeoutf
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. - isIPf
Returns
6ifinputis an IPv6 address. Returns4ifinputis an IPv4 address in dot-decimal notation with no leading zeroes. Otherwise, returns0. - isIPv4f
Returns
trueifinputis an IPv4 address in dot-decimal notation with no leading zeroes. Otherwise, returnsfalse. - isIPv6f
Returns
trueifinputis an IPv6 address. Otherwise, returnsfalse. - setDefaultAutoSelectFamilyf
Sets the default value of the
autoSelectFamilyoption ofsocket.connect(options). - setDefaultAutoSelectFamilyAttemptTimeoutf
Sets the default value of the
autoSelectFamilyAttemptTimeoutoption ofsocket.connect(options). - AddressInfoI
- DropArgumentI
- IpcNetConnectOptsI
- IpcSocketConnectOptsI
- ListenOptionsI
- OnReadOptsI
- ServerOptsI
- SocketAddressInitOptionsI
- SocketConstructorOptsI
- TcpNetConnectOptsI
- TcpSocketConnectOptsI
- ConnectOptsI
- IPVersionT
- LookupFunctionT
- NetConnectOptsT
- SocketConnectOptsT
- SocketReadyStateT
node:os
- archf
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'. - availableParallelismf
Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.
- cpusf
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. - endiannessf
Returns a string identifying the endianness of the CPU for which the Node.js binary was compiled.
- freememf
Returns the amount of free system memory in bytes as an integer.
- getPriorityf
Returns the scheduling priority for the process specified by
pid. Ifpidis not provided or is0, the priority of the current process is returned. - homedirf
Returns the string path of the current user's home directory.
- hostnamef
Returns the host name of the operating system as a string.
- loadavgf
Returns an array containing the 1, 5, and 15 minute load averages.
- machinef
Returns the machine type as a string, such as
arm,arm64,aarch64,mips,mips64,ppc64,ppc64le,s390,s390x,i386,i686,x86_64. - networkInterfacesf
Returns an object containing network interfaces that have been assigned a network address.
- platformf
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'. - releasef
Returns the operating system as a string.
- setPriorityf
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. - tmpdirf
Returns the operating system's default directory for temporary files as a string.
- totalmemf
Returns the total amount of system memory in bytes as an integer.
- typef
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. - uptimef
Returns the system uptime in number of seconds.
- userInfof
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. - versionf
Returns a string identifying the kernel version.
- CpuInfoI
The
node:osmodule provides operating system-related utility methods and properties. It can be accessed using: - NetworkInterfaceBaseI
- NetworkInterfaceInfoIPv4I
- NetworkInterfaceInfoIPv6I
- UserInfoI
- constantsN
- constants.dlopenN
- constants.errnoN
- constants.priorityN
- constants.signalsNv
- NetworkInterfaceInfoT
- SignalConstantsT
- constants.dlopen.RTLD_DEEPBINDv
- constants.dlopen.RTLD_GLOBALv
- constants.dlopen.RTLD_LAZYv
- constants.dlopen.RTLD_LOCALv
- constants.dlopen.RTLD_NOWv
- constants.errno.E2BIGv
- constants.errno.EACCESv
- constants.errno.EADDRINUSEv
- constants.errno.EADDRNOTAVAILv
- constants.errno.EAFNOSUPPORTv
- constants.errno.EAGAINv
- constants.errno.EALREADYv
- constants.errno.EBADFv
- constants.errno.EBADMSGv
- constants.errno.EBUSYv
- constants.errno.ECANCELEDv
- constants.errno.ECHILDv
- constants.errno.ECONNABORTEDv
- constants.errno.ECONNREFUSEDv
- constants.errno.ECONNRESETv
- constants.errno.EDEADLKv
- constants.errno.EDESTADDRREQv
- constants.errno.EDOMv
- constants.errno.EDQUOTv
- constants.errno.EEXISTv
- constants.errno.EFAULTv
- constants.errno.EFBIGv
- constants.errno.EHOSTUNREACHv
- constants.errno.EIDRMv
- constants.errno.EILSEQv
- constants.errno.EINPROGRESSv
- constants.errno.EINTRv
- constants.errno.EINVALv
- constants.errno.EIOv
- constants.errno.EISCONNv
- constants.errno.EISDIRv
- constants.errno.ELOOPv
- constants.errno.EMFILEv
- constants.errno.EMLINKv
- constants.errno.EMSGSIZEv
- constants.errno.EMULTIHOPv
- constants.errno.ENAMETOOLONGv
- constants.errno.ENETDOWNv
- constants.errno.ENETRESETv
- constants.errno.ENETUNREACHv
- constants.errno.ENFILEv
- constants.errno.ENOBUFSv
- constants.errno.ENODATAv
- constants.errno.ENODEVv
- constants.errno.ENOENTv
- constants.errno.ENOEXECv
- constants.errno.ENOLCKv
- constants.errno.ENOLINKv
- constants.errno.ENOMEMv
- constants.errno.ENOMSGv
- constants.errno.ENOPROTOOPTv
- constants.errno.ENOSPCv
- constants.errno.ENOSRv
- constants.errno.ENOSTRv
- constants.errno.ENOSYSv
- constants.errno.ENOTCONNv
- constants.errno.ENOTDIRv
- constants.errno.ENOTEMPTYv
- constants.errno.ENOTSOCKv
- constants.errno.ENOTSUPv
- constants.errno.ENOTTYv
- constants.errno.ENXIOv
- constants.errno.EOPNOTSUPPv
- constants.errno.EOVERFLOWv
- constants.errno.EPERMv
- constants.errno.EPIPEv
- constants.errno.EPROTOv
- constants.errno.EPROTONOSUPPORTv
- constants.errno.EPROTOTYPEv
- constants.errno.ERANGEv
- constants.errno.EROFSv
- constants.errno.ESPIPEv
- constants.errno.ESRCHv
- constants.errno.ESTALEv
- constants.errno.ETIMEv
- constants.errno.ETIMEDOUTv
- constants.errno.ETXTBSYv
- constants.errno.EWOULDBLOCKv
- constants.errno.EXDEVv
- constants.errno.WSA_E_CANCELLEDv
- constants.errno.WSA_E_NO_MOREv
- constants.errno.WSAEACCESv
- constants.errno.WSAEADDRINUSEv
- constants.errno.WSAEADDRNOTAVAILv
- constants.errno.WSAEAFNOSUPPORTv
- constants.errno.WSAEALREADYv
- constants.errno.WSAEBADFv
- constants.errno.WSAECANCELLEDv
- constants.errno.WSAECONNABORTEDv
- constants.errno.WSAECONNREFUSEDv
- constants.errno.WSAECONNRESETv
- constants.errno.WSAEDESTADDRREQv
- constants.errno.WSAEDISCONv
- constants.errno.WSAEDQUOTv
- constants.errno.WSAEFAULTv
- constants.errno.WSAEHOSTDOWNv
- constants.errno.WSAEHOSTUNREACHv
- constants.errno.WSAEINPROGRESSv
- constants.errno.WSAEINTRv
- constants.errno.WSAEINVALv
- constants.errno.WSAEINVALIDPROCTABLEv
- constants.errno.WSAEINVALIDPROVIDERv
- constants.errno.WSAEISCONNv
- constants.errno.WSAELOOPv
- constants.errno.WSAEMFILEv
- constants.errno.WSAEMSGSIZEv
- constants.errno.WSAENAMETOOLONGv
- constants.errno.WSAENETDOWNv
- constants.errno.WSAENETRESETv
- constants.errno.WSAENETUNREACHv
- constants.errno.WSAENOBUFSv
- constants.errno.WSAENOMOREv
- constants.errno.WSAENOPROTOOPTv
- constants.errno.WSAENOTCONNv
- constants.errno.WSAENOTEMPTYv
- constants.errno.WSAENOTSOCKv
- constants.errno.WSAEOPNOTSUPPv
- constants.errno.WSAEPFNOSUPPORTv
- constants.errno.WSAEPROCLIMv
- constants.errno.WSAEPROTONOSUPPORTv
- constants.errno.WSAEPROTOTYPEv
- constants.errno.WSAEPROVIDERFAILEDINITv
- constants.errno.WSAEREFUSEDv
- constants.errno.WSAEREMOTEv
- constants.errno.WSAESHUTDOWNv
- constants.errno.WSAESOCKTNOSUPPORTv
- constants.errno.WSAESTALEv
- constants.errno.WSAETIMEDOUTv
- constants.errno.WSAETOOMANYREFSv
- constants.errno.WSAEUSERSv
- constants.errno.WSAEWOULDBLOCKv
- constants.errno.WSANOTINITIALISEDv
- constants.errno.WSASERVICE_NOT_FOUNDv
- constants.errno.WSASYSCALLFAILUREv
- constants.errno.WSASYSNOTREADYv
- constants.errno.WSATYPE_NOT_FOUNDv
- constants.errno.WSAVERNOTSUPPORTEDv
- constants.priority.PRIORITY_ABOVE_NORMALv
- constants.priority.PRIORITY_BELOW_NORMALv
- constants.priority.PRIORITY_HIGHv
- constants.priority.PRIORITY_HIGHESTv
- constants.priority.PRIORITY_LOWv
- constants.priority.PRIORITY_NORMALv
- constants.UV_UDP_REUSEADDRv
- devNullv
- EOLv
The operating system-specific end-of-line marker.
node:path
- default.FormatInputPathObjectI
- default.ParsedPathI
A parsed path object generated by path.parse() or consumed by path.format().
- default.PlatformPathI
- path.FormatInputPathObjectI
- path.ParsedPathI
A parsed path object generated by path.parse() or consumed by path.format().
- path.PlatformPathI
- defaultNv
The
node:pathmodule provides utilities for working with file and directory paths. It can be accessed using: - pathNv
The
node:pathmodule provides utilities for working with file and directory paths. It can be accessed using:
node:perf_hooks
- PerformanceEntrycv
The constructor of this class is not exposed to users directly.
- PerformanceMarkcv
Exposes marks created via the
Performance.mark()method. - PerformanceMeasurecv
Exposes measures created via the
Performance.measure()method. - PerformanceNodeTimingc
This property is an extension by Node.js. It is not available in Web browsers.
- PerformanceObservercv
- PerformanceObserverEntryListcv
- PerformanceResourceTimingcv
Provides detailed network timing data regarding the loading of an application's resources.
- createHistogramf
Returns a
RecordableHistogram. - monitorEventLoopDelayf
- CreateHistogramOptionsI
- EventLoopMonitorOptionsI
- EventLoopUtilizationI
- HistogramI
- IntervalHistogramI
- MarkOptionsI
- MeasureOptionsI
- NodeGCPerformanceDetailI
- PerformanceI
- RecordableHistogramI
- TimerifyOptionsI
- UVMetricsI
- constantsN
- EntryTypeT
- EventLoopUtilityFunctionT
- PerformanceObserverCallbackT
- constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGEv
- constants.NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORYv
- constants.NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINEDv
- constants.NODE_PERFORMANCE_GC_FLAGS_FORCEDv
- constants.NODE_PERFORMANCE_GC_FLAGS_NOv
- constants.NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLEv
- constants.NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSINGv
- constants.NODE_PERFORMANCE_GC_INCREMENTALv
- constants.NODE_PERFORMANCE_GC_MAJORv
- constants.NODE_PERFORMANCE_GC_MINORv
- constants.NODE_PERFORMANCE_GC_WEAKCBv
- performancev
node:process
- CpuUsageI
- EmitWarningOptionsI
- HRTimeI
- MemoryUsageI
- MemoryUsageFnI
- ProcessI
- ProcessConfigI
- ProcessEnvI
- ProcessFeaturesI
- ProcessPermissionI
- ProcessReleaseI
- ProcessReportI
- ProcessVersionsI
- ReadStreamI
- ResourceUsageI
- SocketI
- WriteStreamI
- ArchitectureT
- BeforeExitListenerT
- DisconnectListenerT
- ExitListenerT
- MessageListenerT
- MultipleResolveListenerT
- MultipleResolveTypeT
- PlatformT
- RejectionHandledListenerT
- SignalsT
- SignalsListenerT
- UncaughtExceptionListenerT
- UncaughtExceptionOriginT
- UnhandledRejectionListenerT
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.
- WarningListenerT
- WorkerListenerT
- processv
node:punycode
- decodef
The
punycode.decode()method converts a Punycode string of ASCII-only characters to the equivalent string of Unicode codepoints. - encodef
The
punycode.encode()method converts a string of Unicode codepoints to a Punycode string of ASCII-only characters. - toASCIIf
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. - toUnicodef
- ucs2Iv
- versionv
node:querystring
- escapef
The
querystring.escape()method performs URL percent-encoding on the givenstrin a manner that is optimized for the specific requirements of URL query strings. - parsef
The
querystring.parse()method parses a URL query string (str) into a collection of key and value pairs. - stringifyf
The
querystring.stringify()method produces a URL query string from a givenobjby iterating through the object's "own properties". - unescapef
The
querystring.unescape()method performs decoding of URL percent-encoded characters on the givenstr. - ParsedUrlQueryI
- ParsedUrlQueryInputI
- ParseOptionsI
- StringifyOptionsI
The
node:querystringmodule provides utilities for parsing and formatting URL query strings. It can be accessed using: - decodev
The querystring.decode() function is an alias for querystring.parse().
- encodev
The querystring.encode() function is an alias for querystring.stringify().
node:readline
- Interfacec
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.Interfacec
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.Readlinec
- clearLinef
The
readline.clearLine()method clears current line of given TTY stream in a specified direction identified bydir. - clearScreenDownf
The
readline.clearScreenDown()method clears the given TTY stream from the current position of the cursor down. - createInterfacef
The
readline.createInterface()method creates a newreadline.Interfaceinstance. - cursorTof
The
readline.cursorTo()method moves cursor to the specified position in a given TTYstream. - emitKeypressEventsf
The
readline.emitKeypressEvents()method causes the givenReadablestream to begin emitting'keypress'events corresponding to received input. - moveCursorf
The
readline.moveCursor()method moves the cursor relative to its current position in a given TTYstream. - promises.createInterfacef
The
readlinePromises.createInterface()method creates a newreadlinePromises.Interfaceinstance. - CursorPosI
- KeyI
- promises.ReadLineOptionsI
- ReadLineOptionsI
- promisesN
- AsyncCompleterT
- CompleterT
- CompleterResultT
- DirectionT
- promises.CompleterT
- ReadLineT
node:readline/promises
- Interfacec
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. - Readlinec
- createInterfacef
The
readlinePromises.createInterface()method creates a newreadlinePromises.Interfaceinstance. - ReadLineOptionsI
- CompleterT
node:repl
- Recoverablec
- REPLServerc
- startf
- REPLCommandI
- ReplOptionsI
- REPLCommandActionT
- REPLEvalT
- REPLWriterT
- REPL_MODE_SLOPPYv
A flag passed in the REPL options. Evaluates expressions in sloppy mode.
- REPL_MODE_STRICTv
A flag passed in the REPL options. Evaluates expressions in strict mode. This is equivalent to prefacing every repl statement with
'use strict'. - writerv
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
- DatabaseSyncc
This class represents a single connection to a SQLite database. All APIs exposed by this class execute synchronously.
- StatementSyncc
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. - ApplyChangesetOptionsI
- CreateSessionOptionsI
- DatabaseSyncOptionsI
- FunctionOptionsI
- SessionI
- StatementResultingChangesI
- constantsN
- SQLInputValueT
- SQLOutputValueT
- SupportedValueTypeT
- constants.SQLITE_CHANGESET_ABORTv
Abort when a change encounters a conflict and roll back database.
- constants.SQLITE_CHANGESET_CONFLICTv
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_DATAv
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_KEYv
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_NOTFOUNDv
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_OMITv
Conflicting changes are omitted.
- constants.SQLITE_CHANGESET_REPLACEv
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
- defaultcN
- default.DuplexcI
Duplex streams are streams that implement both the
ReadableandWritableinterfaces. - default.PassThroughc
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.Readablec
- default.Transformc
Transform streams are
Duplexstreams where the output is in some way related to the input. Like allDuplexstreams,Transformstreams implement both theReadableandWritableinterfaces. - default.Writablec
- StreamcN
- Stream.DuplexcI
Duplex streams are streams that implement both the
ReadableandWritableinterfaces. - Stream.PassThroughc
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.Readablec
- Stream.Transformc
Transform streams are
Duplexstreams where the output is in some way related to the input. Like allDuplexstreams,Transformstreams implement both theReadableandWritableinterfaces. - Stream.Writablec
- default.addAbortSignalf
A stream to attach a signal to.
- default.duplexPairf
The utility function
duplexPairreturns an Array with two items, each being aDuplexstream connected to the other side: - default.finishedfN
A readable and/or writable stream/webstream.
- default.finished.__promisify__f
- default.getDefaultHighWaterMarkf
Returns the default highWaterMark used by streams. Defaults to
65536(64 KiB), or16forobjectMode. - default.isErroredf
Returns whether the stream has encountered an error.
- default.isReadablef
Returns whether the stream is readable.
- default.pipelinefN
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__f
- default.setDefaultHighWaterMarkf
Sets the default highWaterMark used by streams.
- Stream.addAbortSignalf
A stream to attach a signal to.
- Stream.duplexPairf
The utility function
duplexPairreturns an Array with two items, each being aDuplexstream connected to the other side: - Stream.finishedfN
A readable and/or writable stream/webstream.
- Stream.finished.__promisify__f
- Stream.getDefaultHighWaterMarkf
Returns the default highWaterMark used by streams. Defaults to
65536(64 KiB), or16forobjectMode. - Stream.isErroredf
Returns whether the stream has encountered an error.
- Stream.isReadablef
Returns whether the stream is readable.
- Stream.pipelinefN
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__f
- Stream.setDefaultHighWaterMarkf
Sets the default highWaterMark used by streams.
- default.ArrayOptionsI
- default.DuplexOptionsI
- default.FinishedOptionsI
- default.PipeI
- default.PipelineOptionsI
- default.ReadableOptionsI
- default.StreamOptionsI
- default.TransformOptionsI
- default.WritableOptionsI
- Stream.ArrayOptionsI
- Stream.DuplexOptionsI
- Stream.FinishedOptionsI
- Stream.PipeI
- Stream.PipelineOptionsI
- Stream.ReadableOptionsI
- Stream.StreamOptionsI
- Stream.TransformOptionsI
- Stream.WritableOptionsI
- ComposeFnParamT
- default.PipelineCallbackT
- default.PipelineDestinationT
- default.PipelineDestinationIterableFunctionT
- default.PipelineDestinationPromiseFunctionT
- default.PipelinePromiseT
- default.PipelineSourceT
- default.PipelineSourceFunctionT
- default.PipelineTransformT
- default.PipelineTransformSourceT
- default.TransformCallbackT
- Stream.PipelineCallbackT
- Stream.PipelineDestinationT
- Stream.PipelineDestinationIterableFunctionT
- Stream.PipelineDestinationPromiseFunctionT
- Stream.PipelinePromiseT
- Stream.PipelineSourceT
- Stream.PipelineSourceFunctionT
- Stream.PipelineTransformT
- Stream.PipelineTransformSourceT
- Stream.TransformCallbackT
node:stream/consumers
node:stream/promises
node:stream/web
- ByteLengthQueuingStrategyIv
This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
- CompressionStreamIv
- CountQueuingStrategyIv
This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
- DecompressionStreamIv
- QueuingStrategyI
- QueuingStrategyInitI
- QueuingStrategySizeI
- ReadableByteStreamControllerIv
- ReadableByteStreamControllerCallbackI
- ReadableStreamIv
This Streams API interface represents a readable stream of byte data.
- ReadableStreamAsyncIteratorI
- ReadableStreamBYOBReaderIv
- ReadableStreamBYOBRequestIv
- ReadableStreamDefaultControllerIv
- ReadableStreamDefaultReaderIv
- ReadableStreamErrorCallbackI
- ReadableStreamGenericReaderI
- ReadableStreamGetReaderOptionsI
- ReadableStreamReadDoneResultI
- ReadableStreamReadValueResultI
- ReadableWritablePairI
- StreamPipeOptionsI
- TextDecoderOptionsI
- TextDecoderStreamIv
- TextEncoderStreamIv
- TransformerI
- TransformerFlushCallbackI
- TransformerStartCallbackI
- TransformerTransformCallbackI
- TransformStreamIv
- TransformStreamDefaultControllerIv
- UnderlyingByteSourceI
- UnderlyingSinkI
- UnderlyingSinkAbortCallbackI
- UnderlyingSinkCloseCallbackI
- UnderlyingSinkStartCallbackI
- UnderlyingSinkWriteCallbackI
- UnderlyingSourceI
- UnderlyingSourceCancelCallbackI
- UnderlyingSourcePullCallbackI
- UnderlyingSourceStartCallbackI
- WritableStreamIv
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.
- WritableStreamDefaultControllerIv
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.
- WritableStreamDefaultWriterIv
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.
- BufferSourceT
- ReadableStreamControllerT
- ReadableStreamReaderT
- ReadableStreamReaderModeT
- ReadableStreamReadResultT
node:string_decoder
- StringDecoderc
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
- MockFunctionContextc
The
MockFunctionContextclass is used to inspect or manipulate the behavior of mocks created via theMockTrackerAPIs. - MockModuleContextc
- MockTimersc
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. - MockTrackerc
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. - SuiteContextc
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. - TestContextc
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. - TestsStreamc
A successful call to
run()will return a newTestsStreamobject, streaming a series of events representing the execution of the tests. - afterf
This function creates a hook that runs after executing a suite.
- afterEachf
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.registerf
Defines a new assertion function with the provided name and function. If an assertion already exists with the same name, it is overwritten.
- beforef
This function creates a hook that runs before executing a suite.
- beforeEachf
This function creates a hook that runs before each test in the current suite.
- defaultfN
The
test()function is the value imported from thetestmodule. Each invocation of this function results in reporting the test to theTestsStream. - default.afterf
This function creates a hook that runs after executing a suite.
- default.afterEachf
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.registerf
Defines a new assertion function with the provided name and function. If an assertion already exists with the same name, it is overwritten.
- default.beforef
This function creates a hook that runs before executing a suite.
- default.beforeEachf
This function creates a hook that runs before each test in the current suite.
- default.describefN
Alias for suite.
- default.describe.onlyf
Shorthand for marking a suite as
only. This is the same as calling describe withoptions.onlyset totrue. - default.describe.skipf
Shorthand for skipping a suite. This is the same as calling describe with
options.skipset totrue. - default.describe.todof
Shorthand for marking a suite as
TODO. This is the same as calling describe withoptions.todoset totrue. - default.itfN
Alias for test.
- default.it.onlyf
Shorthand for marking a test as
only. This is the same as calling it withoptions.onlyset totrue. - default.it.skipf
Shorthand for skipping a test. This is the same as calling it with
options.skipset totrue. - default.it.todof
Shorthand for marking a test as
TODO. This is the same as calling it withoptions.todoset totrue. - default.onlyf
Shorthand for marking a test as
only. This is the same as calling test withoptions.onlyset totrue. - default.runf
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.skipf
Shorthand for skipping a test. This is the same as calling test with
options.skipset totrue. - default.snapshot.setDefaultSnapshotSerializersf
This function is used to customize the default serialization mechanism used by the test runner.
- default.snapshot.setResolveSnapshotPathf
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.suitefN
The
suite()function is imported from thenode:testmodule. - default.suite.onlyf
Shorthand for marking a suite as
only. This is the same as calling suite withoptions.onlyset totrue. - default.suite.skipf
Shorthand for skipping a suite. This is the same as calling suite with
options.skipset totrue. - default.suite.todof
Shorthand for marking a suite as
TODO. This is the same as calling suite withoptions.todoset totrue. - default.todof
Shorthand for marking a test as
TODO. This is the same as calling test withoptions.todoset totrue. - describefN
Alias for suite.
- describe.onlyf
Shorthand for marking a suite as
only. This is the same as calling describe withoptions.onlyset totrue. - describe.skipf
Shorthand for skipping a suite. This is the same as calling describe with
options.skipset totrue. - describe.todof
Shorthand for marking a suite as
TODO. This is the same as calling describe withoptions.todoset totrue. - itfN
Alias for test.
- it.onlyf
Shorthand for marking a test as
only. This is the same as calling it withoptions.onlyset totrue. - it.skipf
Shorthand for skipping a test. This is the same as calling it with
options.skipset totrue. - it.todof
Shorthand for marking a test as
TODO. This is the same as calling it withoptions.todoset totrue. - onlyf
Shorthand for marking a test as
only. This is the same as calling test withoptions.onlyset totrue. - runf
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. - skipf
Shorthand for skipping a test. This is the same as calling test with
options.skipset totrue. - snapshot.setDefaultSnapshotSerializersf
This function is used to customize the default serialization mechanism used by the test runner.
- snapshot.setResolveSnapshotPathf
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. - suitefN
The
suite()function is imported from thenode:testmodule. - suite.onlyf
Shorthand for marking a suite as
only. This is the same as calling suite withoptions.onlyset totrue. - suite.skipf
Shorthand for skipping a suite. This is the same as calling suite with
options.skipset totrue. - suite.todof
Shorthand for marking a suite as
TODO. This is the same as calling suite withoptions.todoset totrue. - testfN
The
test()function is the value imported from thetestmodule. Each invocation of this function results in reporting the test to theTestsStream. - test.afterf
This function creates a hook that runs after executing a suite.
- test.afterEachf
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.registerf
Defines a new assertion function with the provided name and function. If an assertion already exists with the same name, it is overwritten.
- test.beforef
This function creates a hook that runs before executing a suite.
- test.beforeEachf
This function creates a hook that runs before each test in the current suite.
- test.describefN
Alias for suite.
- test.describe.onlyf
Shorthand for marking a suite as
only. This is the same as calling describe withoptions.onlyset totrue. - test.describe.skipf
Shorthand for skipping a suite. This is the same as calling describe with
options.skipset totrue. - test.describe.todof
Shorthand for marking a suite as
TODO. This is the same as calling describe withoptions.todoset totrue. - test.itfN
Alias for test.
- test.it.onlyf
Shorthand for marking a test as
only. This is the same as calling it withoptions.onlyset totrue. - test.it.skipf
Shorthand for skipping a test. This is the same as calling it with
options.skipset totrue. - test.it.todof
Shorthand for marking a test as
TODO. This is the same as calling it withoptions.todoset totrue. - test.onlyf
Shorthand for marking a test as
only. This is the same as calling test withoptions.onlyset totrue. - test.runf
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.skipf
Shorthand for skipping a test. This is the same as calling test with
options.skipset totrue. - test.snapshot.setDefaultSnapshotSerializersf
This function is used to customize the default serialization mechanism used by the test runner.
- test.snapshot.setResolveSnapshotPathf
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.suitefN
The
suite()function is imported from thenode:testmodule. - test.suite.onlyf
Shorthand for marking a suite as
only. This is the same as calling suite withoptions.onlyset totrue. - test.suite.skipf
Shorthand for skipping a suite. This is the same as calling suite with
options.skipset totrue. - test.suite.todof
Shorthand for marking a suite as
TODO. This is the same as calling suite withoptions.todoset totrue. - test.todof
Shorthand for marking a test as
TODO. This is the same as calling test withoptions.todoset totrue. - todof
Shorthand for marking a test as
TODO. This is the same as calling test withoptions.todoset totrue. - AssertSnapshotOptionsI
- HookOptionsI
Configuration options for hooks.
- MockFunctionCallI
- MockFunctionOptionsI
- MockMethodOptionsI
- MockModuleOptionsI
- MockTimersOptionsI
- RunOptionsI
- TestContextAssertI
- TestContextWaitForOptionsI
- TestOptionsI
- TestShardI
- assertN
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.assertN
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.snapshotN
- snapshotN
- test.assertN
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.snapshotN
- FunctionPropertyNamesT
- HookFnT
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.
- MockT
- NoOpFunctionT
- SuiteFnT
The type of a suite test function. The argument to this function is a SuiteContext object.
- TestContextHookFnT
The hook function. The first argument is a
TestContextobject. If the hook uses callbacks, the callback function is passed as the second argument. - TestFnT
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.
- TimerT
- default.mockv
- mockv
- test.mockv
node:test/reporters
- LcovReporterc
- SpecReporterc
- dotf
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. - junitf
The
junitreporter outputs test results in a jUnit XML format. - tapf
The
tapreporter outputs the test results in the TAP format. - ReporterConstructorWrapperI
- TestEventT
- TestEventGeneratorT
- lcovv
The
lcovreporter outputs test coverage when used with the--experimental-test-coverageflag. - specv
The
specreporter outputs the test results in a human-readable format.
node:timers
- clearImmediatef
Cancels an
Immediateobject created bysetImmediate(). - clearIntervalf
Cancels a
Timeoutobject created bysetInterval(). - clearTimeoutf
Cancels a
Timeoutobject created bysetTimeout(). - promises.setImmediatef
- promises.setIntervalf
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.setTimeoutf
- queueMicrotaskf
The
queueMicrotask()method queues a microtask to invokecallback. Ifcallbackthrows an exception, theprocessobject'uncaughtException'event will be emitted. - setImmediatefN
Schedules the "immediate" execution of the
callbackafter I/O events' callbacks. - setImmediate.setImmediatef
- setIntervalf
Schedules repeated execution of
callbackeverydelaymilliseconds. - setTimeoutfN
Schedules execution of a one-time
callbackafterdelaymilliseconds. - setTimeout.setTimeoutf
- ImmediateI
This object is created internally and is returned from
setImmediate(). It can be passed toclearImmediate()in order to cancel the scheduled actions. - promises.SchedulerI
- TimeoutI
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. - TimerOptionsI
- TimerI
- promisesN
The
timers/promisesAPI provides an alternative set of timer functions that returnPromiseobjects. The API is accessible viarequire('node:timers/promises'). - promises.schedulerv
node:timers/promises
- setImmediatef
- setIntervalf
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. - setTimeoutf
- SchedulerI
- schedulerv
node:tls
- Serverc
Accepts encrypted connections using TLS or SSL.
- TLSSocketc
Performs transparent encryption of written data and all required TLS negotiation.
- checkServerIdentityf
Verifies the certificate
certis issued tohostname. - connectf
The
callbackfunction, if specified, will be added as a listener for the'secureConnect'event. - createSecureContextf
[createServer](/api/node/tls/sets the default value of thehonorCipherOrderoption totrue, other APIs that create secure contexts leave it unset. - createServerf
Creates a new Server. The
secureConnectionListener, if provided, is automatically set as a listener for the'secureConnection'event. - getCiphersf
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/. - createSecurePairf
- CertificateI
- CipherNameAndProtocolI
- CommonConnectionOptionsI
- ConnectionOptionsI
- DetailedPeerCertificateI
- EphemeralKeyInfoI
- KeyObjectI
- PeerCertificateI
- PSKCallbackNegotationI
- PxfObjectI
- SecureContextI
- SecureContextOptionsI
- TlsOptionsI
- TLSSocketOptionsI
- SecurePairI
- SecureVersionT
- CLIENT_RENEG_LIMITv
- CLIENT_RENEG_WINDOWv
- DEFAULT_CIPHERSv
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_CURVEv
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_VERSIONv
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_VERSIONv
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. - rootCertificatesv
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
- ReadStreamc
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. - WriteStreamc
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. - isattyf
The
tty.isatty()method returnstrueif the givenfdis associated with a TTY andfalseif it is not, including wheneverfdis not a non-negative integer. - DirectionT
-1 - to the left from cursor 0 - the entire line 1 - to the right from cursor
node:url
- URLcIv
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. - URLSearchParamscIv
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. - domainToASCIIf
Returns the Punycode ASCII serialization of the
domain. Ifdomainis an invalid domain, the empty string is returned. - domainToUnicodef
Returns the Unicode serialization of the
domain. Ifdomainis an invalid domain, the empty string is returned. - fileURLToPathf
This function ensures the correct decodings of percent-encoded characters as well as ensuring a cross-platform valid absolute path string.
- formatf
The
url.format()method returns a formatted URL string derived fromurlObject. - parsef
- pathToFileURLf
This function ensures that
pathis resolved absolutely, and that the URL control characters are correctly encoded when converting into a File URL. - resolvef
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. - urlToHttpOptionsf
This utility function converts a URL object into an ordinary options object as expected by the
http.request()andhttps.request()APIs. - FileUrlToPathOptionsI
- GlobalI
- PathToFileUrlOptionsI
- UrlI
- URLFormatOptionsI
- UrlObjectI
- URLSearchParamsIteratorI
- UrlWithParsedQueryI
- UrlWithStringQueryI
node:util
- MIMEParamsc
- MIMETypec
- TextDecodercv
An implementation of the WHATWG Encoding Standard
TextDecoderAPI. - TextEncodercv
An implementation of the WHATWG Encoding Standard
TextEncoderAPI. All instances ofTextEncoderonly support UTF-8 encoding. - abortedf
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. - callbackifyf
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. - debuglogf
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. - deprecatef
The
util.deprecate()method wrapsfn(which may be a function or class) in such a way that it is marked as deprecated. - formatf
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: - formatWithOptionsf
- getCallSitesf
Returns an array of call site objects containing the stack of the caller function.
- getSystemErrorMapf
- getSystemErrorMessagef
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.
- getSystemErrorNamef
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. - inheritsf
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. - inspectfN
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. - isDeepStrictEqualf
Returns
trueif there is deep strict equality betweenval1andval2. Otherwise, returnsfalse. - parseArgsf
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. - parseEnvf
Stability: 1.1 - Active development Given an example
.envfile: - promisifyfN
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. - stripVTControlCharactersf
Returns
strwith any ANSI escape codes removed. - styleTextf
This function returns a formatted text considering the
formatpassed. - toUSVStringf
Returns the
stringafter replacing any surrogate code points (or equivalently, any unpaired surrogate code units) with the Unicode "replacement character" U+FFFD. - transferableAbortControllerf
- transferableAbortSignalf
- types.isAnyArrayBufferf
Returns
trueif the value is a built-inArrayBufferorSharedArrayBufferinstance. - types.isArgumentsObjectf
Returns
trueif the value is anargumentsobject. - types.isArrayBufferf
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.isArrayBufferViewf
Returns
trueif the value is an instance of one of theArrayBufferviews, such as typed array objects orDataView. Equivalent toArrayBuffer.isView(). - types.isAsyncFunctionf
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.isBigInt64Arrayf
Returns
trueif the value is aBigInt64Arrayinstance. - types.isBigIntObjectf
Returns
trueif the value is a BigInt object, e.g. created byObject(BigInt(123)). - types.isBigUint64Arrayf
Returns
trueif the value is aBigUint64Arrayinstance. - types.isBooleanObjectf
Returns
trueif the value is a boolean object, e.g. created bynew Boolean(). - types.isBoxedPrimitivef
Returns
trueif the value is any boxed primitive object, e.g. created bynew Boolean(),new String()orObject(Symbol()). - types.isCryptoKeyf
Returns
trueifvalueis aCryptoKey,falseotherwise. - types.isDataViewf
Returns
trueif the value is a built-inDataViewinstance. - types.isDatef
Returns
trueif the value is a built-inDateinstance. - types.isExternalf
Returns
trueif the value is a nativeExternalvalue. - types.isFloat32Arrayf
Returns
trueif the value is a built-inFloat32Arrayinstance. - types.isFloat64Arrayf
Returns
trueif the value is a built-inFloat64Arrayinstance. - types.isGeneratorFunctionf
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.isGeneratorObjectf
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.isInt16Arrayf
Returns
trueif the value is a built-inInt16Arrayinstance. - types.isInt32Arrayf
Returns
trueif the value is a built-inInt32Arrayinstance. - types.isInt8Arrayf
Returns
trueif the value is a built-inInt8Arrayinstance. - types.isKeyObjectf
Returns
trueifvalueis aKeyObject,falseotherwise. - types.isMapf
Returns
trueif the value is a built-inMapinstance. - types.isMapIteratorf
Returns
trueif the value is an iterator returned for a built-inMapinstance. - types.isModuleNamespaceObjectf
Returns
trueif the value is an instance of a Module Namespace Object. - types.isNativeErrorf
Returns
trueif the value was returned by the constructor of a built-inErrortype. - types.isNumberObjectf
Returns
trueif the value is a number object, e.g. created bynew Number(). - types.isPromisef
Returns
trueif the value is a built-inPromise. - types.isProxyf
Returns
trueif the value is aProxyinstance. - types.isRegExpf
Returns
trueif the value is a regular expression object. - types.isSetf
Returns
trueif the value is a built-inSetinstance. - types.isSetIteratorf
Returns
trueif the value is an iterator returned for a built-inSetinstance. - types.isSharedArrayBufferf
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.isStringObjectf
Returns
trueif the value is a string object, e.g. created bynew String(). - types.isSymbolObjectf
Returns
trueif the value is a symbol object, created by callingObject()on aSymbolprimitive. - types.isTypedArrayf
Returns
trueif the value is a built-inTypedArrayinstance. - types.isUint16Arrayf
Returns
trueif the value is a built-inUint16Arrayinstance. - types.isUint32Arrayf
Returns
trueif the value is a built-inUint32Arrayinstance. - types.isUint8Arrayf
Returns
trueif the value is a built-inUint8Arrayinstance. - types.isUint8ClampedArrayf
Returns
trueif the value is a built-inUint8ClampedArrayinstance. - types.isWeakMapf
Returns
trueif the value is a built-inWeakMapinstance. - types.isWeakSetf
Returns
trueif the value is a built-inWeakSetinstance. - isArrayf
Alias for
Array.isArray(). - isBooleanf
Returns
trueif the givenobjectis aBoolean. Otherwise, returnsfalse. - isBufferf
Returns
trueif the givenobjectis aBuffer. Otherwise, returnsfalse. - isDatef
Returns
trueif the givenobjectis aDate. Otherwise, returnsfalse. - isErrorf
Returns
trueif the givenobjectis anError. Otherwise, returnsfalse. - isFunctionf
Returns
trueif the givenobjectis aFunction. Otherwise, returnsfalse. - isNullf
Returns
trueif the givenobjectis strictlynull. Otherwise, returnsfalse. - isNullOrUndefinedf
Returns
trueif the givenobjectisnullorundefined. Otherwise, returnsfalse. - isNumberf
Returns
trueif the givenobjectis aNumber. Otherwise, returnsfalse. - isObjectf
Returns
trueif the givenobjectis strictly anObjectand not aFunction(even though functions are objects in JavaScript). Otherwise, returnsfalse. - isPrimitivef
Returns
trueif the givenobjectis a primitive type. Otherwise, returnsfalse. - isRegExpf
Returns
trueif the givenobjectis aRegExp. Otherwise, returnsfalse. - isStringf
Returns
trueif the givenobjectis astring. Otherwise, returnsfalse. - isSymbolf
Returns
trueif the givenobjectis aSymbol. Otherwise, returnsfalse. - isUndefinedf
Returns
trueif the givenobjectisundefined. Otherwise, returnsfalse. - logf
The
util.log()method prints the givenstringtostdoutwith an included timestamp. - CallSiteObjectI
- CustomPromisifyLegacyI
- CustomPromisifySymbolI
- DebugLoggerI
- EncodeIntoResultI
- GetCallSitesOptionsI
- InspectOptionsI
- InspectOptionsStylizedI
- ParseArgsConfigI
- ParseArgsOptionDescriptorI
- ParseArgsOptionsConfigI
- typesN
- ApplyOptionalModifiersT
- BackgroundColorsT
- CustomInspectFunctionT
- CustomPromisifyT
- DebugLoggerFunctionT
- ExtractOptionValueT
- ForegroundColorsT
- IfDefaultsFalseT
- IfDefaultsTrueT
- ModifiersT
- OptionTokenT
- ParseArgsOptionsTypeT
Type of argument used in parseArgs.
- ParsedOptionTokenT
- ParsedPositionalsT
- ParsedPositionalTokenT
- ParsedResultsT
- ParsedTokensT
- ParsedValuesT
- PreciseParsedResultsT
- PreciseTokenForOptionsT
- StyleT
- TokenT
- TokenForOptionsT
- debugv
- inspect.colorsv
- inspect.customv
That can be used to declare custom inspect functions.
- inspect.defaultOptionsv
- inspect.replDefaultsv
Allows changing inspect settings from the repl.
- inspect.stylesv
- promisify.customv
That can be used to declare custom promisified variants of functions.
node:util/types
- isAnyArrayBufferf
Returns
trueif the value is a built-inArrayBufferorSharedArrayBufferinstance. - isArgumentsObjectf
Returns
trueif the value is anargumentsobject. - isArrayBufferf
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. - isArrayBufferViewf
Returns
trueif the value is an instance of one of theArrayBufferviews, such as typed array objects orDataView. Equivalent toArrayBuffer.isView(). - isAsyncFunctionf
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. - isBigInt64Arrayf
Returns
trueif the value is aBigInt64Arrayinstance. - isBigIntObjectf
Returns
trueif the value is a BigInt object, e.g. created byObject(BigInt(123)). - isBigUint64Arrayf
Returns
trueif the value is aBigUint64Arrayinstance. - isBooleanObjectf
Returns
trueif the value is a boolean object, e.g. created bynew Boolean(). - isBoxedPrimitivef
Returns
trueif the value is any boxed primitive object, e.g. created bynew Boolean(),new String()orObject(Symbol()). - isCryptoKeyf
Returns
trueifvalueis aCryptoKey,falseotherwise. - isDataViewf
Returns
trueif the value is a built-inDataViewinstance. - isDatef
Returns
trueif the value is a built-inDateinstance. - isExternalf
Returns
trueif the value is a nativeExternalvalue. - isFloat32Arrayf
Returns
trueif the value is a built-inFloat32Arrayinstance. - isFloat64Arrayf
Returns
trueif the value is a built-inFloat64Arrayinstance. - isGeneratorFunctionf
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. - isGeneratorObjectf
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. - isInt16Arrayf
Returns
trueif the value is a built-inInt16Arrayinstance. - isInt32Arrayf
Returns
trueif the value is a built-inInt32Arrayinstance. - isInt8Arrayf
Returns
trueif the value is a built-inInt8Arrayinstance. - isKeyObjectf
Returns
trueifvalueis aKeyObject,falseotherwise. - isMapf
Returns
trueif the value is a built-inMapinstance. - isMapIteratorf
Returns
trueif the value is an iterator returned for a built-inMapinstance. - isModuleNamespaceObjectf
Returns
trueif the value is an instance of a Module Namespace Object. - isNativeErrorf
Returns
trueif the value was returned by the constructor of a built-inErrortype. - isNumberObjectf
Returns
trueif the value is a number object, e.g. created bynew Number(). - isPromisef
Returns
trueif the value is a built-inPromise. - isProxyf
Returns
trueif the value is aProxyinstance. - isRegExpf
Returns
trueif the value is a regular expression object. - isSetf
Returns
trueif the value is a built-inSetinstance. - isSetIteratorf
Returns
trueif the value is an iterator returned for a built-inSetinstance. - isSharedArrayBufferf
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. - isStringObjectf
Returns
trueif the value is a string object, e.g. created bynew String(). - isSymbolObjectf
Returns
trueif the value is a symbol object, created by callingObject()on aSymbolprimitive. - isTypedArrayf
Returns
trueif the value is a built-inTypedArrayinstance. - isUint16Arrayf
Returns
trueif the value is a built-inUint16Arrayinstance. - isUint32Arrayf
Returns
trueif the value is a built-inUint32Arrayinstance. - isUint8Arrayf
Returns
trueif the value is a built-inUint8Arrayinstance. - isUint8ClampedArrayf
Returns
trueif the value is a built-inUint8ClampedArrayinstance. - isWeakMapf
Returns
trueif the value is a built-inWeakMapinstance. - isWeakSetf
Returns
trueif the value is a built-inWeakSetinstance.
node:v8
- DefaultDeserializerc
A subclass of
Deserializercorresponding to the format written byDefaultSerializer. - DefaultSerializerc
A subclass of
Serializerthat serializesTypedArray(in particularBuffer) andDataViewobjects as host objects, and only stores the part of their underlyingArrayBuffers that they are referring to. - Deserializerc
- GCProfilerc
This API collects GC data in current thread.
- Serializerc
- cachedDataVersionTagf
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. - deserializef
Uses a
DefaultDeserializerwith default options to read a JS value from a buffer. - getHeapCodeStatisticsf
Get statistics about code and its metadata in the heap, see V8
GetHeapCodeAndMetadataStatisticsAPI. Returns an object with the following properties: - getHeapSnapshotf
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.
- getHeapSpaceStatisticsf
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. - getHeapStatisticsf
Returns an object with the following properties:
- queryObjectsf
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. - serializef
Uses a
DefaultSerializerto serializevalueinto a buffer. - setFlagsFromStringf
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. - setHeapSnapshotNearHeapLimitf
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. - stopCoveragef
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. - takeCoveragef
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. - writeHeapSnapshotf
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.
- AfterI
Called immediately after a promise continuation executes. This may be after a
then(),catch(), orfinally()handler or before an await after another await. - BeforeI
Called before a promise continuation executes. This can be in the form of
then(),catch(), orfinally()handlers or an await resuming. - GCProfilerResultI
- HeapCodeStatisticsI
- HeapInfoI
- HeapSnapshotOptionsI
- HeapSpaceInfoI
- HeapSpaceStatisticsI
- HeapStatisticsI
- HookCallbacksI
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.
- InitI
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.
- PromiseHooksI
- SettledI
Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of Promise.resolve() or Promise.reject().
- StartupSnapshotI
- DoesZapCodeSpaceFlagT
- StartupSnapshotCallbackFnT
- promiseHooksv
The
promiseHooksinterface can be used to track promise lifecycle events. - startupSnapshotv
The
v8.startupSnapshotinterface can be used to add serialization and deserialization hooks for custom startup snapshots.
node:vm
- Modulec
This feature is only available with the
--experimental-vm-modulescommand flag enabled. - Scriptc
- SourceTextModulec
This feature is only available with the
--experimental-vm-modulescommand flag enabled. - SyntheticModulec
This feature is only available with the
--experimental-vm-modulescommand flag enabled. - compileFunctionf
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. - createContextf
- isContextf
Returns
trueif the givenobjectobject has been contextified using createContext, or if it's the global object of a context created usingvm.constants.DONT_CONTEXTIFY. - measureMemoryf
- runInContextf
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. - runInNewContextf
This method is a shortcut to
(new vm.Script(code, options)).runInContext(vm.createContext(options), options). Ifoptionsis a string, then it specifies the filename. - runInThisContextf
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. - BaseOptionsI
- CompileFunctionOptionsI
- ContextI
- CreateContextOptionsI
- MeasureMemoryOptionsI
- MemoryMeasurementI
- ModuleEvaluateOptionsI
- RunningCodeInNewContextOptionsI
- RunningCodeOptionsI
- RunningScriptInNewContextOptionsI
- RunningScriptOptionsI
- ScriptOptionsI
- SourceTextModuleOptionsI
- SyntheticModuleOptionsI
- constantsN
Returns an object containing commonly used constants for VM operations.
- MeasureMemoryModeT
- ModuleLinkerT
- ModuleStatusT
- constants.DONT_CONTEXTIFYv
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_LOADERv
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
- MessageChannelcv
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. - MessagePortcv
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. - Workerc
- getEnvironmentDataf
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. - isMarkedAsUntransferablef
Check if an object is marked as not transferable with markAsUntransferable.
- markAsUncloneablef
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. - markAsUntransferablef
- moveMessagePortToContextf
- receiveMessageOnPortf
- setEnvironmentDataf
The
worker.setEnvironmentData()API sets the content ofworker.getEnvironmentData()in the current thread and all newWorkerinstances spawned from the current context. - BroadcastChannelcIv
Instances of
BroadcastChannelallow asynchronous one-to-many communication with all otherBroadcastChannelinstances bound to the same channel name. - ResourceLimitsI
- WorkerOptionsI
- WorkerPerformanceI
- SerializableT
- TransferListItemT
- isInternalThreadv
- isMainThreadv
- parentPortv
- resourceLimitsv
- SHARE_ENVv
- threadIdv
- workerDatav
node:zlib
- brotliCompressf
- brotliCompressSyncf
Compress a chunk of data with
BrotliCompress. - brotliDecompressf
- brotliDecompressSyncf
Decompress a chunk of data with
BrotliDecompress. - crc32f
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. - createBrotliCompressf
Creates and returns a new
BrotliCompressobject. - createBrotliDecompressf
Creates and returns a new
BrotliDecompressobject. - createDeflatef
Creates and returns a new
Deflateobject. - createDeflateRawf
Creates and returns a new
DeflateRawobject. - createGunzipf
Creates and returns a new
Gunzipobject. - createGzipf
Creates and returns a new
Gzipobject. Seeexample. - createInflatef
Creates and returns a new
Inflateobject. - createInflateRawf
Creates and returns a new
InflateRawobject. - createUnzipf
Creates and returns a new
Unzipobject. - deflatef
- deflateRawf
- deflateRawSyncf
Compress a chunk of data with
DeflateRaw. - deflateSyncf
Compress a chunk of data with
Deflate. - gunzipf
- gunzipSyncf
Decompress a chunk of data with
Gunzip. - gzipf
- gzipSyncf
Compress a chunk of data with
Gzip. - inflatef
- inflateRawf
- inflateRawSyncf
Decompress a chunk of data with
InflateRaw. - inflateSyncf
Decompress a chunk of data with
Inflate. - unzipf
- unzipSyncf
Decompress a chunk of data with
Unzip. - BrotliCompressI
- BrotliDecompressI
- BrotliOptionsI
- DeflateI
- DeflateRawI
- GunzipI
- GzipI
- InflateI
- InflateRawI
- UnzipI
- ZlibI
- ZlibOptionsI
- ZlibParamsI
- ZlibResetI
- constantsN
- CompressCallbackT
- InputTypeT
- constants.BROTLI_DECODEv
- constants.BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREESv
- constants.BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAPv
- constants.BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODESv
- constants.BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1v
- constants.BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2v
- constants.BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPSv
- constants.BROTLI_DECODER_ERROR_DICTIONARY_NOT_SETv
- constants.BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1v
- constants.BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2v
- constants.BROTLI_DECODER_ERROR_FORMAT_CL_SPACEv
- constants.BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEATv
- constants.BROTLI_DECODER_ERROR_FORMAT_DICTIONARYv
- constants.BROTLI_DECODER_ERROR_FORMAT_DISTANCEv
- constants.BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLEv
- constants.BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLEv
- constants.BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACEv
- constants.BROTLI_DECODER_ERROR_FORMAT_PADDING_1v
- constants.BROTLI_DECODER_ERROR_FORMAT_PADDING_2v
- constants.BROTLI_DECODER_ERROR_FORMAT_RESERVEDv
- constants.BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABETv
- constants.BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAMEv
- constants.BROTLI_DECODER_ERROR_FORMAT_TRANSFORMv
- constants.BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITSv
- constants.BROTLI_DECODER_ERROR_INVALID_ARGUMENTSv
- constants.BROTLI_DECODER_ERROR_UNREACHABLEv
- constants.BROTLI_DECODER_NEEDS_MORE_INPUTv
- constants.BROTLI_DECODER_NEEDS_MORE_OUTPUTv
- constants.BROTLI_DECODER_NO_ERRORv
- constants.BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATIONv
- constants.BROTLI_DECODER_PARAM_LARGE_WINDOWv
- constants.BROTLI_DECODER_RESULT_ERRORv
- constants.BROTLI_DECODER_RESULT_NEEDS_MORE_INPUTv
- constants.BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUTv
- constants.BROTLI_DECODER_RESULT_SUCCESSv
- constants.BROTLI_DECODER_SUCCESSv
- constants.BROTLI_DEFAULT_MODEv
- constants.BROTLI_DEFAULT_QUALITYv
- constants.BROTLI_DEFAULT_WINDOWv
- constants.BROTLI_ENCODEv
- constants.BROTLI_LARGE_MAX_WINDOW_BITSv
- constants.BROTLI_MAX_INPUT_BLOCK_BITSv
- constants.BROTLI_MAX_QUALITYv
- constants.BROTLI_MAX_WINDOW_BITSv
- constants.BROTLI_MIN_INPUT_BLOCK_BITSv
- constants.BROTLI_MIN_QUALITYv
- constants.BROTLI_MIN_WINDOW_BITSv
- constants.BROTLI_MODE_FONTv
- constants.BROTLI_MODE_GENERICv
- constants.BROTLI_MODE_TEXTv
- constants.BROTLI_OPERATION_EMIT_METADATAv
- constants.BROTLI_OPERATION_FINISHv
- constants.BROTLI_OPERATION_FLUSHv
- constants.BROTLI_OPERATION_PROCESSv
- constants.BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELINGv
- constants.BROTLI_PARAM_LARGE_WINDOWv
- constants.BROTLI_PARAM_LGBLOCKv
- constants.BROTLI_PARAM_LGWINv
- constants.BROTLI_PARAM_MODEv
- constants.BROTLI_PARAM_NDIRECTv
- constants.BROTLI_PARAM_NPOSTFIXv
- constants.BROTLI_PARAM_QUALITYv
- constants.BROTLI_PARAM_SIZE_HINTv
- constants.DEFLATEv
- constants.DEFLATERAWv
- constants.GUNZIPv
- constants.GZIPv
- constants.INFLATEv
- constants.INFLATERAWv
- constants.UNZIPv
- constants.Z_BEST_COMPRESSIONv
- constants.Z_BEST_SPEEDv
- constants.Z_BLOCKv
- constants.Z_BUF_ERRORv
- constants.Z_DATA_ERRORv
- constants.Z_DEFAULT_CHUNKv
- constants.Z_DEFAULT_COMPRESSIONv
- constants.Z_DEFAULT_LEVELv
- constants.Z_DEFAULT_MEMLEVELv
- constants.Z_DEFAULT_STRATEGYv
- constants.Z_DEFAULT_WINDOWBITSv
- constants.Z_ERRNOv
- constants.Z_FILTEREDv
- constants.Z_FINISHv
- constants.Z_FIXEDv
- constants.Z_FULL_FLUSHv
- constants.Z_HUFFMAN_ONLYv
- constants.Z_MAX_CHUNKv
- constants.Z_MAX_LEVELv
- constants.Z_MAX_MEMLEVELv
- constants.Z_MAX_WINDOWBITSv
- constants.Z_MEM_ERRORv
- constants.Z_MIN_CHUNKv
- constants.Z_MIN_LEVELv
- constants.Z_MIN_MEMLEVELv
- constants.Z_MIN_WINDOWBITSv
- constants.Z_NEED_DICTv
- constants.Z_NO_COMPRESSIONv
- constants.Z_NO_FLUSHv
- constants.Z_OKv
- constants.Z_PARTIAL_FLUSHv
- constants.Z_RLEv
- constants.Z_STREAM_ENDv
- constants.Z_STREAM_ERRORv
- constants.Z_SYNC_FLUSHv
- constants.Z_TREESv
- constants.Z_VERSION_ERRORv
- constants.ZLIB_VERNUMv
- Z_ASCIIv
- Z_BEST_COMPRESSIONv
- Z_BEST_SPEEDv
- Z_BINARYv
- Z_BLOCKv
- Z_BUF_ERRORv
- Z_DATA_ERRORv
- Z_DEFAULT_COMPRESSIONv
- Z_DEFAULT_STRATEGYv
- Z_DEFLATEDv
- Z_ERRNOv
- Z_FILTEREDv
- Z_FINISHv
- Z_FIXEDv
- Z_FULL_FLUSHv
- Z_HUFFMAN_ONLYv
- Z_MEM_ERRORv
- Z_NEED_DICTv
- Z_NO_COMPRESSIONv
- Z_NO_FLUSHv
- Z_OKv
- Z_PARTIAL_FLUSHv
- Z_RLEv
- Z_STREAM_ENDv
- Z_STREAM_ERRORv
- Z_SYNC_FLUSHv
- Z_TEXTv
- Z_TREESv
- Z_UNKNOWNv
- Z_VERSION_ERRORv