diff --git a/doc/api/assert.md b/doc/api/assert.md index c2978b1f4f9c67..7df70f60c35952 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -142,7 +142,7 @@ lax: assert.deepEqual(/a/gi, new Date()); ``` -## assert(value[, message]) +## assert(value\[, message\]) @@ -152,7 +152,7 @@ added: v0.5.9 An alias of [`assert.ok()`][]. -## assert.deepEqual(actual, expected[, message]) +## assert.deepEqual(actual, expected\[, message\]) @@ -471,7 +471,7 @@ assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) }); ``` -## assert.doesNotThrow(fn[, error][, message]) +## assert.doesNotThrow(fn\[, error\]\[, message\]) @@ -587,7 +587,7 @@ parameter is undefined, a default error message is assigned. If the `message` parameter is an instance of an [`Error`][] then it will be thrown instead of the `AssertionError`. -## assert.fail([message]) +## assert.fail(\[message\]) @@ -614,7 +614,7 @@ assert.fail(new TypeError('need array')); Using `assert.fail()` with more than two arguments is possible but deprecated. See below for further details. -## assert.fail(actual, expected[, message[, operator[, stackStartFn]]]) +## assert.fail(actual, expected\[, message\[, operator\[, stackStartFn\]\]\]) @@ -885,7 +885,7 @@ parameter is undefined, a default error message is assigned. If the `message` parameter is an instance of an [`Error`][] then it will be thrown instead of the `AssertionError`. -## assert.notStrictEqual(actual, expected[, message]) +## assert.notStrictEqual(actual, expected\[, message\]) @@ -1049,7 +1049,7 @@ argument, then `error` is assumed to be omitted and the string will be used for example in [`assert.throws()`][] carefully if using a string as the second argument gets considered. -## assert.strictEqual(actual, expected[, message]) +## assert.strictEqual(actual, expected\[, message\]) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 2d37c65b8d3b6b..b1fa5167d0de53 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -343,7 +343,7 @@ Allocates a new `Buffer` using an `array` of octets. const buf = new Buffer([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); ``` -### new Buffer(arrayBuffer[, byteOffset[, length]]) +### new Buffer(arrayBuffer\[, byteOffset\[, length\]\]) @@ -882,7 +882,7 @@ console.log(buf2.toString()); A `TypeError` will be thrown if `buffer` is not a `Buffer` or other type appropriate for `Buffer.from()` variants. -### Class Method: Buffer.from(object[, offsetOrEncoding[, length]]) +### Class Method: Buffer.from(object\[, offsetOrEncoding\[, length\]\]) @@ -919,7 +919,7 @@ const buf = Buffer.from(new Foo(), 'utf8'); A `TypeError` will be thrown if `object` has not mentioned methods or is not of other type appropriate for `Buffer.from()` variants. -### Class Method: Buffer.from(string[, encoding]) +### Class Method: Buffer.from(string\[, encoding\]) @@ -990,7 +990,7 @@ added: v0.11.3 This is the size (in bytes) of pre-allocated internal `Buffer` instances used for pooling. This value may be modified. -### buf[index] +### buf\[index\] @@ -1234,7 +1234,7 @@ console.log(buf1.equals(buf3)); // Prints: false ``` -### buf.fill(value[, offset[, end]][, encoding]) +### buf.fill(value\[, offset\[, end\]\]\[, encoding\]) @@ -1339,7 +1339,7 @@ console.log(buf.includes('this', 4)); // Prints: false ``` -### buf.indexOf(value[, byteOffset][, encoding]) +### buf.indexOf(value\[, byteOffset\]\[, encoding\]) @@ -1591,8 +1591,8 @@ the specified endian format (`readBigInt64BE()` returns big endian, Integers read from a `Buffer` are interpreted as two's complement signed values. -### buf.readBigUInt64BE([offset]) -### buf.readBigUInt64LE([offset]) +### buf.readBigUInt64BE(\[offset\]) +### buf.readBigUInt64LE(\[offset\]) @@ -1615,8 +1615,8 @@ console.log(buf.readBigUInt64LE(0)); // Prints: 18446744069414584320n ``` -### buf.readDoubleBE([offset]) -### buf.readDoubleLE([offset]) +### buf.readDoubleBE(\[offset\]) +### buf.readDoubleLE(\[offset\]) @@ -1985,7 +1985,7 @@ console.log(buf.subarray(-5, -2).toString()); // (Equivalent to buf.subarray(1, 4).) ``` -### buf.slice([start[, end]]) +### buf.slice(\[start\[, end\]\]) @@ -2222,7 +2222,7 @@ for (const value of buf) { // 114 ``` -### buf.write(string[, offset[, length]][, encoding]) +### buf.write(string\[, offset\[, length\]\]\[, encoding\]) @@ -2249,8 +2249,8 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); // Prints: 12 bytes: ½ + ¼ = ¾ ``` -### buf.writeBigInt64BE(value[, offset]) -### buf.writeBigInt64LE(value[, offset]) +### buf.writeBigInt64BE(value\[, offset\]) +### buf.writeBigInt64LE(value\[, offset\]) @@ -2275,8 +2275,8 @@ console.log(buf); // Prints: ``` -### buf.writeBigUInt64BE(value[, offset]) -### buf.writeBigUInt64LE(value[, offset]) +### buf.writeBigUInt64BE(value\[, offset\]) +### buf.writeBigUInt64LE(value\[, offset\]) @@ -2299,8 +2299,8 @@ console.log(buf); // Prints: ``` -### buf.writeDoubleBE(value[, offset]) -### buf.writeDoubleLE(value[, offset]) +### buf.writeDoubleBE(value\[, offset\]) +### buf.writeDoubleLE(value\[, offset\]) @@ -1148,7 +1148,7 @@ subprocess.unref(); subprocess.ref(); ``` -### subprocess.send(message[, sendHandle[, options]][, callback]) +### subprocess.send(message\[, sendHandle\[, options\]\]\[, callback\]) @@ -456,7 +456,7 @@ Workers will call `process.exit(0)` if the `'disconnect'` event occurs on `process` and `.exitedAfterDisconnect` is not `true`. This protects against accidental disconnection. -### worker.send(message[, sendHandle][, callback]) +### worker.send(message\[, sendHandle\]\[, callback\]) @@ -682,7 +682,7 @@ finished. This can only be called from the master process. -## cluster.fork([env]) +## cluster.fork(\[env\]) @@ -777,7 +777,7 @@ the settings, including the default values. This object is not intended to be changed or set manually. -## cluster.setupMaster([settings]) +## cluster.setupMaster(\[settings\]) @@ -204,7 +204,7 @@ undefined > ``` -### console.countReset([label]) +### console.countReset(\[label\]) @@ -226,7 +226,7 @@ undefined > ``` -### console.debug(data[, ...args]) +### console.debug(data\[, ...args\]) @@ -273,7 +273,7 @@ changes: This method calls `console.log()` passing it the arguments received. This method does not produce any XML formatting. -### console.error([data][, ...args]) +### console.error(\[data\]\[, ...args\]) @@ -298,7 +298,7 @@ If formatting elements (e.g. `%d`) are not found in the first string then [`util.inspect()`][] is called on each argument and the resulting string values are concatenated. See [`util.format()`][] for more information. -### console.group([...label]) +### console.group(\[...label\]) @@ -324,7 +324,7 @@ added: v8.5.0 Decreases indentation of subsequent lines by two spaces. -### console.info([data][, ...args]) +### console.info(\[data\]\[, ...args\]) @@ -334,7 +334,7 @@ added: v0.1.100 The `console.info()` function is an alias for [`console.log()`][]. -### console.log([data][, ...args]) +### console.log(\[data\]\[, ...args\]) @@ -357,7 +357,7 @@ console.log('count:', count); See [`util.format()`][] for more information. -### console.table(tabularData[, properties]) +### console.table(tabularData\[, properties\]) @@ -394,7 +394,7 @@ console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); // └─────────┴─────┘ ``` -### console.time([label]) +### console.time(\[label\]) @@ -406,7 +406,7 @@ are identified by a unique `label`. Use the same `label` when calling [`console.timeEnd()`][] to stop the timer and output the elapsed time in milliseconds to `stdout`. Timer durations are accurate to the sub-millisecond. -### console.timeEnd([label]) +### console.timeEnd(\[label\]) @@ -448,7 +448,7 @@ doExpensiveProcess2(value); console.timeEnd('process'); ``` -### console.trace([message][, ...args]) +### console.trace(\[message\]\[, ...args\]) @@ -475,7 +475,7 @@ console.trace('Show me'); // at REPLServer.Interface._ttyWrite (readline.js:826:14) ``` -### console.warn([data][, ...args]) +### console.warn(\[data\]\[, ...args\]) @@ -490,7 +490,7 @@ The following methods are exposed by the V8 engine in the general API but do not display anything unless used in conjunction with the [inspector][] (`--inspect` flag). -### console.markTimeline([label]) +### console.markTimeline(\[label\]) @@ -501,7 +501,7 @@ This method does not display anything unless used in the inspector. The `console.markTimeline()` method is the deprecated form of [`console.timeStamp()`][]. -### console.profile([label]) +### console.profile(\[label\]) @@ -520,7 +520,7 @@ console.profileEnd('MyLabel'); // Adds the profile 'MyLabel' to the Profiles panel of the inspector. ``` -### console.profileEnd([label]) +### console.profileEnd(\[label\]) @@ -535,7 +535,7 @@ the report to the **Profiles** panel of the inspector. See If this method is called without a label, the most recently started profile is stopped. -### console.timeStamp([label]) +### console.timeStamp(\[label\]) @@ -546,7 +546,7 @@ This method does not display anything unless used in the inspector. The `console.timeStamp()` method adds an event with the label `'label'` to the **Timeline** panel of the inspector. -### console.timeline([label]) +### console.timeline(\[label\]) @@ -556,7 +556,7 @@ added: v8.0.0 This method does not display anything unless used in the inspector. The `console.timeline()` method is the deprecated form of [`console.time()`][]. -### console.timelineEnd([label]) +### console.timelineEnd(\[label\]) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 0c98506f1b48b1..b4f91c1d559e71 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -68,7 +68,7 @@ console.log(challenge.toString('utf8')); // Prints: the challenge as a UTF8 string ``` -### Certificate.exportPublicKey(spkac[, encoding]) +### Certificate.exportPublicKey(spkac\[, encoding\]) @@ -265,7 +265,7 @@ console.log(encrypted); // Prints: e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa ``` -### cipher.final([outputEncoding]) +### cipher.final(\[outputEncoding\]) @@ -279,7 +279,7 @@ Once the `cipher.final()` method has been called, the `Cipher` object can no longer be used to encrypt data. Attempts to call `cipher.final()` more than once will result in an error being thrown. -### cipher.setAAD(buffer[, options]) +### cipher.setAAD(buffer\[, options\]) @@ -312,7 +312,7 @@ added: v1.0.0 The `cipher.getAuthTag()` method should only be called after encryption has been completed using the [`cipher.final()`][] method. -### cipher.setAutoPadding([autoPadding]) +### cipher.setAutoPadding(\[autoPadding\]) @@ -332,7 +332,7 @@ using `0x0` instead of PKCS padding. The `cipher.setAutoPadding()` method must be called before [`cipher.final()`][]. -### cipher.update(data[, inputEncoding][, outputEncoding]) +### cipher.update(data\[, inputEncoding\]\[, outputEncoding\]) @@ -473,7 +473,7 @@ Once the `decipher.final()` method has been called, the `Decipher` object can no longer be used to decrypt data. Attempts to call `decipher.final()` more than once will result in an error being thrown. -### decipher.setAAD(buffer[, options]) +### decipher.setAAD(buffer\[, options\]) @@ -541,7 +541,7 @@ multiple of the ciphers block size. The `decipher.setAutoPadding()` method must be called before [`decipher.final()`][]. -### decipher.update(data[, inputEncoding][, outputEncoding]) +### decipher.update(data\[, inputEncoding\]\[, outputEncoding\]) @@ -622,7 +622,7 @@ provided, `otherPublicKey` is expected to be a [`Buffer`][], If `outputEncoding` is given a string is returned; otherwise, a [`Buffer`][] is returned. -### diffieHellman.generateKeys([encoding]) +### diffieHellman.generateKeys(\[encoding\]) @@ -636,7 +636,7 @@ transferred to the other party. If `encoding` is provided a string is returned; otherwise a [`Buffer`][] is returned. -### diffieHellman.getGenerator([encoding]) +### diffieHellman.getGenerator(\[encoding\]) @@ -648,7 +648,7 @@ Returns the Diffie-Hellman generator in the specified `encoding`. If `encoding` is provided a string is returned; otherwise a [`Buffer`][] is returned. -### diffieHellman.getPrime([encoding]) +### diffieHellman.getPrime(\[encoding\]) @@ -660,7 +660,7 @@ Returns the Diffie-Hellman prime in the specified `encoding`. If `encoding` is provided a string is returned; otherwise a [`Buffer`][] is returned. -### diffieHellman.getPrivateKey([encoding]) +### diffieHellman.getPrivateKey(\[encoding\]) @@ -672,7 +672,7 @@ Returns the Diffie-Hellman private key in the specified `encoding`. If `encoding` is provided a string is returned; otherwise a [`Buffer`][] is returned. -### diffieHellman.getPublicKey([encoding]) +### diffieHellman.getPublicKey(\[encoding\]) @@ -684,7 +684,7 @@ Returns the Diffie-Hellman public key in the specified `encoding`. If `encoding` is provided a string is returned; otherwise a [`Buffer`][] is returned. -### diffieHellman.setPrivateKey(privateKey[, encoding]) +### diffieHellman.setPrivateKey(privateKey\[, encoding\]) @@ -697,7 +697,7 @@ Sets the Diffie-Hellman private key. If the `encoding` argument is provided, to be a string. If no `encoding` is provided, `privateKey` is expected to be a [`Buffer`][], `TypedArray`, or `DataView`. -### diffieHellman.setPublicKey(publicKey[, encoding]) +### diffieHellman.setPublicKey(publicKey\[, encoding\]) @@ -784,7 +784,7 @@ assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); // OK ``` -### Class Method: ECDH.convertKey(key, curve[, inputEncoding[, outputEncoding[, format]]]) +### Class Method: ECDH.convertKey(key, curve\[, inputEncoding\[, outputEncoding\[, format\]\]\]) @@ -832,7 +832,7 @@ const uncompressedKey = ECDH.convertKey(compressedKey, console.log(uncompressedKey === ecdh.getPublicKey('hex')); ``` -### ecdh.computeSecret(otherPublicKey[, inputEncoding][, outputEncoding]) +### ecdh.computeSecret(otherPublicKey\[, inputEncoding\]\[, outputEncoding\]) @@ -887,7 +887,7 @@ The `format` argument specifies point encoding and can be `'compressed'` or If `encoding` is provided a string is returned; otherwise a [`Buffer`][] is returned. -### ecdh.getPrivateKey([encoding]) +### ecdh.getPrivateKey(\[encoding\]) @@ -898,7 +898,7 @@ added: v0.11.14 If `encoding` is specified, a string is returned; otherwise a [`Buffer`][] is returned. -### ecdh.getPublicKey([encoding][, format]) +### ecdh.getPublicKey(\[encoding\]\[, format\]) @@ -915,7 +915,7 @@ The `format` argument specifies point encoding and can be `'compressed'` or If `encoding` is specified, a string is returned; otherwise a [`Buffer`][] is returned. -### ecdh.setPrivateKey(privateKey[, encoding]) +### ecdh.setPrivateKey(privateKey\[, encoding\]) @@ -932,7 +932,7 @@ If `privateKey` is not valid for the curve specified when the `ECDH` object was created, an error is thrown. Upon setting the private key, the associated public point (key) is also generated and set in the `ECDH` object. -### ecdh.setPublicKey(publicKey[, encoding]) +### ecdh.setPublicKey(publicKey\[, encoding\]) @@ -1057,7 +1057,7 @@ a [`Buffer`][] is returned. The `Hash` object can not be used again after `hash.digest()` method has been called. Multiple calls will cause an error to be thrown. -### hash.update(data[, inputEncoding]) +### hash.update(data\[, inputEncoding\]) @@ -1154,7 +1154,7 @@ provided a string is returned; otherwise a [`Buffer`][] is returned; The `Hmac` object can not be used again after `hmac.digest()` has been called. Multiple calls to `hmac.digest()` will result in an error being thrown. -### hmac.update(data[, inputEncoding]) +### hmac.update(data\[, inputEncoding\]) @@ -1354,7 +1354,7 @@ console.log(verify.verify(publicKey, signature)); // Prints: true ``` -### sign.sign(privateKey[, outputEncoding]) +### sign.sign(privateKey\[, outputEncoding\]) @@ -1842,7 +1842,7 @@ predefined curve specified by the `curveName` string. Use OpenSSL releases, `openssl ecparam -list_curves` will also display the name and description of each available elliptic curve. -### crypto.createHash(algorithm[, options]) +### crypto.createHash(algorithm\[, options\]) @@ -2021,7 +2021,7 @@ the corresponding digest algorithm. This does not work for all signature algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest algorithm names. -### crypto.createVerify(algorithm[, options]) +### crypto.createVerify(algorithm\[, options\]) @@ -2505,7 +2505,7 @@ object, the `padding` property can be passed. Otherwise, this function uses Because RSA public keys can be derived from private keys, a private key may be passed instead of a public key. -### crypto.randomBytes(size[, callback]) +### crypto.randomBytes(size\[, callback\]) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index eaaa5090f8502a..25096437288421 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2003,7 +2003,7 @@ to be verified, no matter if it is set to true or not. Skipping the verification could lead to hard to find errors and crashes. -### DEP0103: process.binding('util').is[...] typechecks +### DEP0103: process.binding('util').is\[...\] typechecks @@ -134,7 +134,7 @@ Returns an object containing the address information for a socket. For UDP sockets, this object will contain `address`, `family` and `port` properties. -### socket.bind([port][, address][, callback]) +### socket.bind(\[port\]\[, address\]\[, callback\]) @@ -243,7 +243,7 @@ socket.bind({ }); ``` -### socket.close([callback]) +### socket.close(\[callback\]) @@ -253,7 +253,7 @@ added: v0.1.99 Close the underlying socket and stop listening for data on it. If a callback is provided, it is added as a listener for the [`'close'`][] event. -### socket.connect(port[, address][, callback]) +### socket.connect(port\[, address\]\[, callback\]) @@ -281,7 +281,7 @@ A synchronous function that disassociates a connected `dgram.Socket` from its remote address. Trying to call `disconnect()` on an already disconnected socket will result in an [`ERR_SOCKET_DGRAM_NOT_CONNECTED`][] exception. -### socket.dropMembership(multicastAddress[, multicastInterface]) +### socket.dropMembership(multicastAddress\[, multicastInterface\]) @@ -340,7 +340,7 @@ Returns an object containing the `address`, `family`, and `port` of the remote endpoint. It throws an [`ERR_SOCKET_DGRAM_NOT_CONNECTED`][] exception if the socket is not connected. -### socket.send(msg[, offset, length][, port][, address][, callback]) +### socket.send(msg\[, offset, length\]\[, port\]\[, address\]\[, callback\]) diff --git a/doc/api/dns.md b/doc/api/dns.md index f7640dfb8eb153..34c6310519ef1c 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -128,7 +128,7 @@ section if a custom port is used. ] ``` -## dns.lookup(hostname[, options], callback) +## dns.lookup(hostname\[, options\], callback) @@ -283,7 +283,7 @@ records. The type and structure of individual results varies based on `rrtype`: On error, `err` is an [`Error`][] object, where `err.code` is one of the [DNS error codes](#dns_error_codes). -## dns.resolve4(hostname[, options], callback) +## dns.resolve4(hostname\[, options\], callback) @@ -770,7 +770,7 @@ dnsPromises.lookupService('127.0.0.1', 22).then((result) => { }); ``` -### dnsPromises.resolve(hostname[, rrtype]) +### dnsPromises.resolve(hostname\[, rrtype\]) @@ -800,7 +800,7 @@ based on `rrtype`: On error, the `Promise` is rejected with an [`Error`][] object, where `err.code` is one of the [DNS error codes](#dns_error_codes). -### dnsPromises.resolve4(hostname[, options]) +### dnsPromises.resolve4(hostname\[, options\]) @@ -816,7 +816,7 @@ Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). -### dnsPromises.resolve6(hostname[, options]) +### dnsPromises.resolve6(hostname\[, options\]) diff --git a/doc/api/domain.md b/doc/api/domain.md index 4aae68cf4027e9..d0ba5a446d983d 100644 --- a/doc/api/domain.md +++ b/doc/api/domain.md @@ -398,7 +398,7 @@ d.on('error', (er) => { The opposite of [`domain.add(emitter)`][]. Removes domain handling from the specified emitter. -### domain.run(fn[, ...args]) +### domain.run(fn\[, ...args\]) * `fn` {Function} * `...args` {any} diff --git a/doc/api/errors.md b/doc/api/errors.md index 8c86012630fe84..97ca365125bc2b 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -201,7 +201,7 @@ are dependent on [V8's stack trace API][]. Stack traces extend only to either (a) the beginning of *synchronous code execution*, or (b) the number of frames given by the property `Error.stackTraceLimit`, whichever is smaller. -### Error.captureStackTrace(targetObject[, constructorOpt]) +### Error.captureStackTrace(targetObject\[, constructorOpt\]) * `targetObject` {Object} * `constructorOpt` {Function} diff --git a/doc/api/esm.md b/doc/api/esm.md index 951ce418195d72..e585ae4db63646 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -910,14 +910,14 @@ _isMain_ is **true** when resolving the Node.js application entry point. > 1. If _exports_ is an Object, then > 1. Set _packagePath_ to _"./"_ concatenated with _packagePath_. > 1. If _packagePath_ is a key of _exports_, then -> 1. Let _target_ be the value of _exports[packagePath]_. +> 1. Let _target_ be the value of _exports\[packagePath\]_. > 1. Return **PACKAGE_EXPORTS_TARGET_RESOLVE**(_packageURL_, _target_, > _""_). > 1. Let _directoryKeys_ be the list of keys of _exports_ ending in > _"/"_, sorted by length descending. > 1. For each key _directory_ in _directoryKeys_, do > 1. If _packagePath_ starts with _directory_, then -> 1. Let _target_ be the value of _exports[directory]_. +> 1. Let _target_ be the value of _exports\[directory\]_. > 1. Let _subpath_ be the substring of _target_ starting at the index > of the length of _directory_. > 1. Return **PACKAGE_EXPORTS_TARGET_RESOLVE**(_packageURL_, _target_, diff --git a/doc/api/events.md b/doc/api/events.md index 608d7d09e04cf0..5eeab1856b7cee 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -295,7 +295,7 @@ added: v0.1.26 Alias for `emitter.on(eventName, listener)`. -### emitter.emit(eventName[, ...args]) +### emitter.emit(eventName\[, ...args\]) @@ -536,7 +536,7 @@ server.prependOnceListener('connection', (stream) => { Returns a reference to the `EventEmitter`, so that calls can be chained. -### emitter.removeAllListeners([eventName]) +### emitter.removeAllListeners(\[eventName\]) diff --git a/doc/api/fs.md b/doc/api/fs.md index d7a4ebcc2e8604..3d122b0e06f91e 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1051,7 +1051,7 @@ added: v11.2.0 This property is `true` if the underlying file has not been opened yet, i.e. before the `'ready'` event is emitted. -## fs.access(path[, mode], callback) +## fs.access(path\[, mode\], callback) @@ -1590,7 +1590,7 @@ const { COPYFILE_EXCL } = fs.constants; fs.copyFile('source.txt', 'destination.txt', COPYFILE_EXCL, callback); ``` -## fs.copyFileSync(src, dest[, flags]) +## fs.copyFileSync(src, dest\[, flags\]) @@ -1636,7 +1636,7 @@ const { COPYFILE_EXCL } = fs.constants; fs.copyFileSync('source.txt', 'destination.txt', COPYFILE_EXCL); ``` -## fs.createReadStream(path[, options]) +## fs.createReadStream(path\[, options\]) @@ -2341,7 +2341,7 @@ changes: Synchronous link(2). Returns `undefined`. -## fs.lstat(path[, options], callback) +## fs.lstat(path\[, options\], callback) @@ -2572,7 +2572,7 @@ this API: [`fs.mkdtemp()`][]. The optional `options` argument can be a string specifying an encoding, or an object with an `encoding` property specifying the character encoding to use. -## fs.open(path[, flags[, mode]], callback) +## fs.open(path\[, flags\[, mode\]\], callback) @@ -2659,7 +2659,7 @@ and cleaning up the directory. The `encoding` option sets the encoding for the `path` while opening the directory and subsequent read operations. -## fs.opendirSync(path[, options]) +## fs.opendirSync(path\[, options\]) @@ -2721,7 +2721,7 @@ The callback is given the three arguments, `(err, bytesRead, buffer)`. If this method is invoked as its [`util.promisify()`][]ed version, it returns a `Promise` for an `Object` with `bytesRead` and `buffer` properties. -## fs.readdir(path[, options], callback) +## fs.readdir(path\[, options\], callback) @@ -3084,7 +3084,7 @@ On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on `/proc` in order for this function to work. Glibc does not have this restriction. -## fs.realpathSync(path[, options]) +## fs.realpathSync(path\[, options\]) @@ -3192,7 +3192,7 @@ changes: Synchronous rename(2). Returns `undefined`. -## fs.rmdir(path[, options], callback) +## fs.rmdir(path\[, options\], callback) @@ -3564,7 +3564,7 @@ changes: Synchronous unlink(2). Returns `undefined`. -## fs.unwatchFile(filename[, listener]) +## fs.unwatchFile(filename\[, listener\]) @@ -3652,7 +3652,7 @@ Returns `undefined`. For detailed information, see the documentation of the asynchronous version of this API: [`fs.utimes()`][]. -## fs.watch(filename[, options][, listener]) +## fs.watch(filename\[, options\]\[, listener\]) @@ -4129,7 +4129,7 @@ On Linux, positional writes don't work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file. -## fs.writevSync(fd, buffers[, position]) +## fs.writevSync(fd, buffers\[, position\]) @@ -4315,7 +4315,7 @@ If one or more `filehandle.read()` calls are made on a file handle and then a position till the end of the file. It doesn't always read from the beginning of the file. -#### filehandle.stat([options]) +#### filehandle.stat(\[options\]) @@ -4458,7 +4458,7 @@ On Linux, positional writes do not work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file. -#### filehandle.write(string[, position[, encoding]]) +#### filehandle.write(string\[, position\[, encoding\]\]) @@ -4519,7 +4519,7 @@ If one or more `filehandle.write()` calls are made on a file handle and then a current position till the end of the file. It doesn't always write from the beginning of the file. -#### filehandle.writev(buffers[, position]) +#### filehandle.writev(buffers\[, position\]) @@ -4545,7 +4545,7 @@ On Linux, positional writes don't work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file. -### fsPromises.access(path[, mode]) +### fsPromises.access(path\[, mode\]) @@ -4580,7 +4580,7 @@ condition, since other processes may change the file's state between the two calls. Instead, user code should open/read/write the file directly and handle the error raised if the file is not accessible. -### fsPromises.appendFile(path, data[, options]) +### fsPromises.appendFile(path, data\[, options\]) @@ -4627,7 +4627,7 @@ added: v10.0.0 Changes the ownership of a file then resolves the `Promise` with no arguments upon success. -### fsPromises.copyFile(src, dest[, flags]) +### fsPromises.copyFile(src, dest\[, flags\]) @@ -4720,7 +4720,7 @@ added: v10.0.0 Asynchronous link(2). The `Promise` is resolved with no arguments upon success. -### fsPromises.lstat(path[, options]) +### fsPromises.lstat(path\[, options\]) @@ -4759,7 +4759,7 @@ property indicating whether parent folders should be created. Calling `fsPromises.mkdir()` when `path` is a directory that exists results in a rejection only when `recursive` is false. -### fsPromises.mkdtemp(prefix[, options]) +### fsPromises.mkdtemp(prefix\[, options\]) @@ -4790,7 +4790,7 @@ characters directly to the `prefix` string. For instance, given a directory `prefix` must end with a trailing platform-specific path separator (`require('path').sep`). -### fsPromises.open(path, flags[, mode]) +### fsPromises.open(path, flags\[, mode\]) @@ -4848,7 +4848,7 @@ async function print(path) { print('./').catch(console.error); ``` -### fsPromises.readdir(path[, options]) +### fsPromises.readdir(path\[, options\]) @@ -4900,7 +4900,7 @@ returned. Any specified `FileHandle` has to support reading. -### fsPromises.readlink(path[, options]) +### fsPromises.readlink(path\[, options\]) @@ -4918,7 +4918,7 @@ object with an `encoding` property specifying the character encoding to use for the link path returned. If the `encoding` is set to `'buffer'`, the link path returned will be passed as a `Buffer` object. -### fsPromises.realpath(path[, options]) +### fsPromises.realpath(path\[, options\]) @@ -4955,7 +4955,7 @@ added: v10.0.0 Renames `oldPath` to `newPath` and resolves the `Promise` with no arguments upon success. -### fsPromises.rmdir(path[, options]) +### fsPromises.rmdir(path\[, options\]) @@ -5025,7 +5025,7 @@ The `type` argument is only used on Windows platforms and can be one of `'dir'`, to be absolute. When using `'junction'`, the `target` argument will automatically be normalized to absolute path. -### fsPromises.truncate(path[, len]) +### fsPromises.truncate(path\[, len\]) @@ -5068,7 +5068,7 @@ The `atime` and `mtime` arguments follow these rules: * If the value can not be converted to a number, or is `NaN`, `Infinity` or `-Infinity`, an `Error` will be thrown. -### fsPromises.writeFile(file, data[, options]) +### fsPromises.writeFile(file, data\[, options\]) diff --git a/doc/api/globals.md b/doc/api/globals.md index 89592b98e1c9bf..a794cfb1961781 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -150,7 +150,7 @@ DataHandler.prototype.load = async function load(key) { This variable may appear to be global but is not. See [`require()`][]. -## setImmediate(callback[, ...args]) +## setImmediate(callback\[, ...args\]) @@ -159,7 +159,7 @@ added: v0.9.1 [`setImmediate`][] is described in the [timers][] section. -## setInterval(callback, delay[, ...args]) +## setInterval(callback, delay\[, ...args\]) @@ -168,7 +168,7 @@ added: v0.0.1 [`setInterval`][] is described in the [timers][] section. -## setTimeout(callback, delay[, ...args]) +## setTimeout(callback, delay\[, ...args\]) diff --git a/doc/api/http.md b/doc/api/http.md index 73de8c36b235df..0d98c91b932d34 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -107,7 +107,7 @@ http.get({ }); ``` -### new Agent([options]) +### new Agent(\[options\]) @@ -149,7 +149,7 @@ options.agent = keepAliveAgent; http.request(options, onResponseCallback); ``` -### agent.createConnection(options[, callback]) +### agent.createConnection(options\[, callback\]) @@ -576,7 +576,7 @@ deprecated: REPLACEME See [`request.socket`][]. -### request.end([data[, encoding]][, callback]) +### request.end(\[data\[, encoding\]\]\[, callback\]) @@ -711,7 +711,7 @@ added: v0.5.9 Once a socket is assigned to this request and is connected [`socket.setNoDelay()`][] will be called. -### request.setSocketKeepAlive([enable][, initialDelay]) +### request.setSocketKeepAlive(\[enable\]\[, initialDelay\]) @@ -722,7 +722,7 @@ added: v0.5.9 Once a socket is assigned to this request and is connected [`socket.setKeepAlive()`][] will be called. -### request.setTimeout(timeout[, callback]) +### request.setTimeout(timeout\[, callback\]) @@ -994,7 +994,7 @@ After this event is emitted, the request's socket will not have a `'data'` event listener, meaning it will need to be bound in order to handle data sent to the server on that socket. -### server.close([callback]) +### server.close(\[callback\]) @@ -1044,7 +1044,7 @@ added: v0.7.0 Limits maximum incoming headers count. If set to 0, no limit will be applied. -### server.setTimeout([msecs][, callback]) +### server.setTimeout(\[msecs\]\[, callback\]) @@ -1481,7 +1481,7 @@ added: v12.7.0 Is `true` if all data has been flushed to the underlying system, immediately before the [`'finish'`][] event is emitted. -### response.write(chunk[, encoding][, callback]) +### response.write(chunk\[, encoding\]\[, callback\]) @@ -1527,7 +1527,7 @@ Sends a HTTP/1.1 100 Continue message to the client, indicating that the request body should be sent. See the [`'checkContinue'`][] event on `Server`. -### response.writeHead(statusCode[, statusMessage][, headers]) +### response.writeHead(statusCode\[, statusMessage\]\[, headers\]) @@ -1778,7 +1778,7 @@ added: v0.11.6 The raw request/response trailer keys and values exactly as they were received. Only populated at the `'end'` event. -### message.setTimeout(msecs[, callback]) +### message.setTimeout(msecs\[, callback\]) @@ -1921,7 +1921,7 @@ A collection of all the standard HTTP response status codes, and the short description of each. For example, `http.STATUS_CODES[404] === 'Not Found'`. -## http.createServer([options][, requestListener]) +## http.createServer(\[options\]\[, requestListener\]) @@ -365,7 +365,7 @@ Will be `true` if this `Http2Session` instance is still connecting, will be set to `false` before emitting `connect` event and/or calling the `http2.connect` callback. -#### http2session.destroy([error][, code]) +#### http2session.destroy(\[error\]\[, code\]) @@ -408,7 +408,7 @@ connected, `true` if the `Http2Session` is connected with a `TLSSocket`, and `false` if the `Http2Session` is connected to any other kind of socket or stream. -#### http2session.goaway([code[, lastStreamID[, opaqueData]]]) +#### http2session.goaway(\[code\[, lastStreamID\[, opaqueData\]\]\]) @@ -456,7 +456,7 @@ a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. Will be `false` once all sent `SETTINGS` frames have been acknowledged. -#### http2session.ping([payload, ]callback) +#### http2session.ping(\[payload, \]callback) @@ -572,7 +572,7 @@ Provides miscellaneous information about the current state of the An object describing the current status of this `Http2Session`. -#### http2session.settings([settings][, callback]) +#### http2session.settings(\[settings\]\[, callback\]) @@ -795,7 +795,7 @@ client.on('origin', (origins) => { The `'origin'` event is only emitted when using a secure TLS connection. -#### clienthttp2session.request(headers[, options]) +#### clienthttp2session.request(headers\[, options\]) @@ -1032,7 +1032,7 @@ added: v11.2.0 This property shows the number of characters currently buffered to be written. See [`net.Socket.bufferSize`][] for details. -#### http2stream.close(code[, callback]) +#### http2stream.close(code\[, callback\]) @@ -1347,7 +1347,7 @@ client's most recent `SETTINGS` frame. Will be `true` if the remote peer accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. -#### http2stream.pushStream(headers[, options], callback) +#### http2stream.pushStream(headers\[, options\], callback) @@ -1392,7 +1392,7 @@ a `weight` value to `http2stream.priority` with the `silent` option set to Calling `http2stream.pushStream()` from within a pushed stream is not permitted and will throw an error. -#### http2stream.respond([headers[, options]]) +#### http2stream.respond(\[headers\[, options\]\]) @@ -1435,7 +1435,7 @@ server.on('stream', (stream) => { }); ``` -#### http2stream.respondWithFD(fd[, headers[, options]]) +#### http2stream.respondWithFD(fd\[, headers\[, options\]\]) @@ -1767,7 +1767,7 @@ If `callback` is provided, it is not invoked until all active sessions have been closed, although the server has already stopped allowing new sessions. See [`net.Server.close()`][] for more details. -#### server.setTimeout([msecs][, callback]) +#### server.setTimeout(\[msecs\]\[, callback\]) @@ -1917,7 +1917,7 @@ If `callback` is provided, it is not invoked until all active sessions have been closed, although the server has already stopped allowing new sessions. See [`tls.Server.close()`][] for more details. -#### server.setTimeout([msecs][, callback]) +#### server.setTimeout(\[msecs\]\[, callback\]) @@ -1935,7 +1935,7 @@ The given callback is registered as a listener on the `'timeout'` event. In case of no callback function were assigned, a new `ERR_INVALID_CALLBACK` error will be thrown. -### http2.createServer(options[, onRequestHandler]) +### http2.createServer(options\[, onRequestHandler\]) @@ -2712,7 +2712,7 @@ deprecated: REPLACEME See [`request.socket`][]. -#### request.destroy([error]) +#### request.destroy(\[error\]) @@ -3013,7 +3013,7 @@ deprecated: REPLACEME See [`response.socket`][]. -#### response.end([data[, encoding]][, callback]) +#### response.end(\[data\[, encoding\]\]\[, callback\]) @@ -3294,7 +3294,7 @@ Is `true` after [`response.end()`][] has been called. This property does not indicate whether the data has been flushed, for this use [`writable.writableFinished`][] instead. -#### response.write(chunk[, encoding][, callback]) +#### response.write(chunk\[, encoding\]\[, callback\]) @@ -3341,7 +3341,7 @@ Sends a status `100 Continue` to the client, indicating that the request body should be sent. See the [`'checkContinue'`][] event on `Http2Server` and `Http2SecureServer`. -#### response.writeHead(statusCode[, statusMessage][, headers]) +#### response.writeHead(statusCode\[, statusMessage\]\[, headers\]) @@ -84,7 +84,7 @@ This method is identical to [`server.listen()`][] from [`net.Server`][]. See [`http.Server#maxHeadersCount`][]. -### server.setTimeout([msecs][, callback]) +### server.setTimeout(\[msecs\]\[, callback\]) @@ -113,7 +113,7 @@ added: v8.0.0 See [`http.Server#keepAliveTimeout`][]. -## https.createServer([options][, requestListener]) +## https.createServer(\[options\]\[, requestListener\]) @@ -156,8 +156,8 @@ https.createServer(options, (req, res) => { }).listen(8000); ``` -## https.get(options[, callback]) -## https.get(url[, options][, callback]) +## https.get(options\[, callback\]) +## https.get(url\[, options\]\[, callback\]) diff --git a/doc/api/modules.md b/doc/api/modules.md index 9ed9273e0b578f..aa07c14d37a267 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -695,7 +695,7 @@ Module { '/node_modules' ] } ``` -#### require.resolve(request[, options]) +#### require.resolve(request\[, options\]) @@ -234,7 +234,7 @@ server.on('error', (e) => { }); ``` -#### server.listen(handle[, backlog][, callback]) +#### server.listen(handle\[, backlog\]\[, callback\]) @@ -253,7 +253,7 @@ valid file descriptor. Listening on a file descriptor is not supported on Windows. -#### server.listen(options[, callback]) +#### server.listen(options\[, callback\]) @@ -319,7 +319,7 @@ added: v0.1.90 Start an [IPC][] server listening for connections on the given `path`. -#### server.listen([port[, host[, backlog]]][, callback]) +#### server.listen(\[port\[, host\[, backlog\]\]\]\[, callback\]) @@ -406,7 +406,7 @@ is received. For example, it is passed to the listeners of a [`'connection'`][] event emitted on a [`net.Server`][], so the user can use it to interact with the client. -### new net.Socket([options]) +### new net.Socket(\[options\]) @@ -603,7 +603,7 @@ the error passed to the [`'error'`][] listener. The last parameter `connectListener`, if supplied, will be added as a listener for the [`'connect'`][] event **once**. -#### socket.connect(options[, connectListener]) +#### socket.connect(options\[, connectListener\]) @@ -725,7 +725,7 @@ that the [`socket.connect(options[, connectListener])`][`socket.connect(options)`] callback is a listener for the `'connect'` event. -### socket.destroy([exception]) +### socket.destroy(\[exception\]) @@ -744,7 +744,7 @@ listeners for that event will receive `exception` as an argument. * {boolean} Indicates if the connection is destroyed or not. Once a connection is destroyed no further data can be transferred using it. -### socket.end([data[, encoding]][, callback]) +### socket.end(\[data\[, encoding\]\]\[, callback\]) @@ -845,7 +845,7 @@ The numeric representation of the remote port. For example, `80` or `21`. Resumes reading after a call to [`socket.pause()`][]. -### socket.setEncoding([encoding]) +### socket.setEncoding(\[encoding\]) @@ -856,7 +856,7 @@ added: v0.1.90 Set the encoding for the socket as a [Readable Stream][]. See [`readable.setEncoding()`][] for more information. -### socket.setKeepAlive([enable][, initialDelay]) +### socket.setKeepAlive(\[enable\]\[, initialDelay\]) @@ -873,7 +873,7 @@ data packet received and the first keepalive probe. Setting `0` for `initialDelay` will leave the value unchanged from the default (or previous) setting. -### socket.setNoDelay([noDelay]) +### socket.setNoDelay(\[noDelay\]) @@ -885,7 +885,7 @@ Disables the Nagle algorithm. By default TCP connections use the Nagle algorithm, they buffer data before sending it off. Setting `true` for `noDelay` will immediately fire off data each time `socket.write()` is called. -### socket.setTimeout(timeout[, callback]) +### socket.setTimeout(timeout\[, callback\]) @@ -925,7 +925,7 @@ Calling `unref()` on a socket will allow the program to exit if this is the only active socket in the event system. If the socket is already `unref`ed calling `unref()` again will have no effect. -### socket.write(data[, encoding][, callback]) +### socket.write(data\[, encoding\]\[, callback\]) @@ -961,7 +961,7 @@ Possible signatures: * [`net.connect(port[, host][, connectListener])`][`net.connect(port, host)`] for TCP connections. -### net.connect(options[, connectListener]) +### net.connect(options\[, connectListener\]) @@ -973,7 +973,7 @@ added: v0.7.0 Alias to [`net.createConnection(options[, connectListener])`][`net.createConnection(options)`]. -### net.connect(path[, connectListener]) +### net.connect(path\[, connectListener\]) @@ -985,7 +985,7 @@ added: v0.1.90 Alias to [`net.createConnection(path[, connectListener])`][`net.createConnection(path)`]. -### net.connect(port[, host][, connectListener]) +### net.connect(port\[, host\]\[, connectListener\]) @@ -1018,7 +1018,7 @@ Possible signatures: The [`net.connect()`][] function is an alias to this function. -### net.createConnection(options[, connectListener]) +### net.createConnection(options\[, connectListener\]) @@ -1068,7 +1068,7 @@ changed to: const client = net.createConnection({ path: '/tmp/echo.sock' }); ``` -### net.createConnection(path[, connectListener]) +### net.createConnection(path\[, connectListener\]) @@ -1089,7 +1089,7 @@ immediately initiates connection with [`socket.connect(path[, connectListener])`][`socket.connect(path)`], then returns the `net.Socket` that starts the connection. -### net.createConnection(port[, host][, connectListener]) +### net.createConnection(port\[, host\]\[, connectListener\]) @@ -1112,7 +1112,7 @@ immediately initiates connection with [`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`], then returns the `net.Socket` that starts the connection. -## net.createServer([options][, connectionListener]) +## net.createServer(\[options\]\[, connectionListener\]) diff --git a/doc/api/os.md b/doc/api/os.md index acd37e6a6f5b29..6f22098f985332 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -192,7 +192,7 @@ added: v0.3.3 The `os.freemem()` method returns the amount of free system memory in bytes as an integer. -## os.getPriority([pid]) +## os.getPriority(\[pid\]) @@ -361,7 +361,7 @@ On POSIX systems, the operating system release is determined by calling [uname(3)][]. On Windows, `GetVersionExW()` is used. Please see https://en.wikipedia.org/wiki/Uname#Examples for more information. -## os.setPriority([pid, ]priority) +## os.setPriority(\[pid, \]priority) @@ -438,7 +438,7 @@ changes: The `os.uptime()` method returns the system uptime in number of seconds. -## os.userInfo([options]) +## os.userInfo(\[options\]) diff --git a/doc/api/path.md b/doc/api/path.md index 8752eb5fdc56c2..e752d7d6883f72 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -60,7 +60,7 @@ example, `path.resolve('c:\\')` can potentially return a different result than `path.resolve('c:')`. For more information, see [this MSDN page][MSDN-Rel-Path]. -## path.basename(path[, ext]) +## path.basename(path\[, ext\]) @@ -463,7 +463,7 @@ path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb'); A [`TypeError`][] is thrown if either `from` or `to` is not a string. -## path.resolve([...paths]) +## path.resolve(\[...paths\]) diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index d6ae1946c4744e..3fcdd99509ca0f 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -30,7 +30,7 @@ doSomeLongRunningProcess(() => { added: v8.5.0 --> -### performance.clearMarks([name]) +### performance.clearMarks(\[name\]) @@ -40,7 +40,7 @@ added: v8.5.0 If `name` is not provided, removes all `PerformanceMark` objects from the Performance Timeline. If `name` is provided, removes only the named mark. -### performance.mark([name]) +### performance.mark(\[name\]) @@ -384,7 +384,7 @@ added: v8.5.0 Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`. -### performanceObserverEntryList.getEntriesByName(name[, type]) +### performanceObserverEntryList.getEntriesByName(name\[, type\]) @@ -410,7 +410,7 @@ Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`. -## perf_hooks.monitorEventLoopDelay([options]) +## perf_hooks.monitorEventLoopDelay(\[options\]) diff --git a/doc/api/process.md b/doc/api/process.md index 0ea80c6e332efc..eedbfeefdd7d40 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -715,7 +715,7 @@ and [Cluster][] documentation), the `process.connected` property will return Once `process.connected` is `false`, it is no longer possible to send messages over the IPC channel using `process.send()`. -## process.cpuUsage([previousValue]) +## process.cpuUsage(\[previousValue\]) @@ -790,7 +790,7 @@ The effect of calling `process.disconnect()` is the same as calling If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. -## process.dlopen(module, filename[, flags]) +## process.dlopen(module, filename\[, flags\]) @@ -878,7 +878,7 @@ process.on('warning', (warning) => { If `warning` is passed as an `Error` object, the `options` argument is ignored. -## process.emitWarning(warning[, type[, code]][, ctor]) +## process.emitWarning(warning\[, type\[, code\]\]\[, ctor\]) @@ -1112,7 +1112,7 @@ that started the Node.js process. '/usr/local/bin/node' ``` -## process.exit([code]) +## process.exit(\[code\]) @@ -1292,7 +1292,7 @@ added: v9.3.0 Indicates whether a callback has been set using [`process.setUncaughtExceptionCaptureCallback()`][]. -## process.hrtime([time]) +## process.hrtime(\[time\]) @@ -1385,7 +1385,7 @@ This function is only available on POSIX platforms (i.e. not Windows or Android). This feature is not available in [`Worker`][] threads. -## process.kill(pid[, signal]) +## process.kill(pid\[, signal\]) @@ -1490,7 +1490,7 @@ _code segment_. When using [`Worker`][] threads, `rss` will be a value that is valid for the entire process, while the other fields will only refer to the current thread. -## process.nextTick(callback[, ...args]) +## process.nextTick(callback\[, ...args\]) @@ -1837,7 +1837,7 @@ The signal used to trigger the creation of a diagnostic report. Defaults to console.log(`Report signal: ${process.report.signal}`); ``` -### process.report.writeReport([filename][, err]) +### process.report.writeReport(\[filename\]\[, err\]) @@ -1935,7 +1935,7 @@ console.log(process.resourceUsage()); */ ``` -## process.send(message[, sendHandle[, options]][, callback]) +## process.send(message\[, sendHandle\[, options\]\]\[, callback\]) @@ -2283,7 +2283,7 @@ documentation for the [`'warning'` event][process_warning] and the [`emitWarning()` method][process_emit_warning] for more information about this flag's behavior. -## process.umask([mask]) +## process.umask(\[mask\]) diff --git a/doc/api/querystring.md b/doc/api/querystring.md index 86885535af1835..383b162ee260b8 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -43,7 +43,7 @@ generally not expected to be used directly. It is exported primarily to allow application code to provide a replacement percent-encoding implementation if necessary by assigning `querystring.escape` to an alternative function. -## querystring.parse(str[, sep[, eq[, options]]]) +## querystring.parse(str\[, sep\[, eq\[, options\]\]\]) diff --git a/doc/api/readline.md b/doc/api/readline.md index 03fdc4417230cf..642272e401e17c 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -212,7 +212,7 @@ later if necessary. Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `readline.Interface` instance. -### rl.prompt([preserveCursor]) +### rl.prompt(\[preserveCursor\]) @@ -279,7 +279,7 @@ added: v0.1.98 The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. -### rl.write(data[, key]) +### rl.write(data\[, key\]) @@ -349,7 +349,7 @@ async function processLineByLine() { } ``` -## readline.clearLine(stream, dir[, callback]) +## readline.clearLine(stream, dir\[, callback\]) @@ -536,7 +536,7 @@ if (process.stdin.isTTY) process.stdin.setRawMode(true); ``` -## readline.moveCursor(stream, dx, dy[, callback]) +## readline.moveCursor(stream, dx, dy\[, callback\]) @@ -476,7 +476,7 @@ buffered but not yet executed. This method is primarily intended to be called from within the action function for commands registered using the `replServer.defineCommand()` method. -### replServer.parseREPLKeyword(keyword[, rest]) +### replServer.parseREPLKeyword(keyword\[, rest\]) @@ -394,7 +394,7 @@ added: v8.0.0 Is `true` after [`writable.destroy()`][writable-destroy] has been called. -##### writable.end([chunk[, encoding]][, callback]) +##### writable.end(\[chunk\[, encoding\]\]\[, callback\]) @@ -1000,7 +1000,7 @@ readable.on('data', (chunk) => { The `readable.pause()` method has no effect if there is a `'readable'` event listener. -##### readable.pipe(destination[, options]) +##### readable.pipe(destination\[, options\]) @@ -1062,7 +1062,7 @@ to prevent memory leaks. The [`process.stderr`][] and [`process.stdout`][] `Writable` streams are never closed until the Node.js process exits, regardless of the specified options. -##### readable.read([size]) +##### readable.read(\[size\]) @@ -1241,7 +1241,7 @@ readable.on('data', (chunk) => { }); ``` -##### readable.unpipe([destination]) +##### readable.unpipe(\[destination\]) @@ -1272,7 +1272,7 @@ setTimeout(() => { }, 1000); ``` -##### readable.unshift(chunk[, encoding]) +##### readable.unshift(chunk\[, encoding\]) @@ -1465,7 +1465,7 @@ Implementors should not override this method, but instead implement The default implementation of `_destroy()` for `Transform` also emit `'close'` unless `emitClose` is set in false. -### stream.finished(stream[, options], callback) +### stream.finished(stream\[, options\], callback) @@ -1599,7 +1599,7 @@ run().catch(console.error); after the `callback` has been invoked. In the case of reuse of streams after failure, this can cause event listener leaks and swallowed errors. -### stream.Readable.from(iterable, [options]) +### stream.Readable.from(iterable, \[options\]) @@ -1695,7 +1695,7 @@ Custom `Writable` streams *must* call the `new stream.Writable([options])` constructor and implement the `writable._write()` and/or `writable._writev()` method. -#### Constructor: new stream.Writable([options]) +#### Constructor: new stream.Writable(\[options\]) @@ -54,7 +54,7 @@ added: v0.1.99 Creates a new `StringDecoder` instance. -### stringDecoder.end([buffer]) +### stringDecoder.end(\[buffer\]) diff --git a/doc/api/timers.md b/doc/api/timers.md index a99dd1c41e60b0..646c0abd1cbd24 100644 --- a/doc/api/timers.md +++ b/doc/api/timers.md @@ -130,7 +130,7 @@ a certain period of time. When a timer's function is called varies depending on which method was used to create the timer and what other work the Node.js event loop is doing. -### setImmediate(callback[, ...args]) +### setImmediate(callback\[, ...args\]) @@ -172,7 +172,7 @@ async function timerExample() { timerExample(); ``` -### setInterval(callback, delay[, ...args]) +### setInterval(callback, delay\[, ...args\]) @@ -190,7 +190,7 @@ set to `1`. Non-integer delays are truncated to an integer. If `callback` is not a function, a [`TypeError`][] will be thrown. -### setTimeout(callback, delay[, ...args]) +### setTimeout(callback, delay\[, ...args\]) diff --git a/doc/api/tls.md b/doc/api/tls.md index d90affa4c3b70d..f2076435e1f58f 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -530,7 +530,7 @@ Returns the bound address, the address family name, and port of the server as reported by the operating system. See [`net.Server.address()`][] for more information. -### server.close([callback]) +### server.close(\[callback\]) @@ -614,7 +614,7 @@ Methods that return TLS connection metadata (e.g. [`tls.TLSSocket.getPeerCertificate()`][] will only return data while the connection is open. -### new tls.TLSSocket(socket[, options]) +### new tls.TLSSocket(socket\[, options\]) @@ -1192,7 +1192,7 @@ the checks done with additional verification. This function is only called if the certificate passed all other checks, such as being issued by trusted CA (`options.ca`). -## tls.connect(options[, callback]) +## tls.connect(options\[, callback\]) @@ -1337,7 +1337,7 @@ as an argument instead of an option. A path option, if specified, will take precedence over the path argument. -## tls.connect(port[, host][, options][, callback]) +## tls.connect(port\[, host\]\[, options\]\[, callback\]) @@ -1354,7 +1354,7 @@ as arguments instead of options. A port or host option, if specified, will take precedence over any port or host argument. -## tls.createSecureContext([options]) +## tls.createSecureContext(\[options\]) @@ -214,7 +214,7 @@ corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number of columns and rows in the corresponding [TTY](tty.html). -### writeStream.hasColors([count][, env]) +### writeStream.hasColors(\[count\]\[, env\]) @@ -250,7 +250,7 @@ added: v0.5.8 A `boolean` that is always `true`. -### writeStream.moveCursor(dx, dy[, callback]) +### writeStream.moveCursor(dx, dy\[, callback\]) @@ -1181,7 +1181,7 @@ The formatting process operates as follows: string, an [`Error`][] is thrown. * `result` is returned. -### url.parse(urlString[, parseQueryString[, slashesDenoteHost]]) +### url.parse(urlString\[, parseQueryString\[, slashesDenoteHost\]\]) @@ -393,8 +393,8 @@ stream.on('data', (data) => { stream.write('With ES6'); ``` -## util.inspect(object[, options]) -## util.inspect(object[, showHidden[, depth[, colors]]]) +## util.inspect(object\[, options\]) +## util.inspect(object\[, showHidden\[, depth\[, colors\]\]\]) diff --git a/doc/api/vm.md b/doc/api/vm.md index 601b8c3052082b..cc244f669401c4 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -51,7 +51,7 @@ added: v0.3.1 Instances of the `vm.Script` class contain precompiled scripts that can be executed in specific sandboxes (or "contexts"). -### Constructor: new vm.Script(code[, options]) +### Constructor: new vm.Script(code\[, options\]) @@ -644,7 +644,7 @@ Compiles the given code into the provided context/sandbox (if no context is supplied, the current context is used), and returns it wrapped inside a function with the given `params`. -## vm.createContext([sandbox[, options]]) +## vm.createContext(\[sandbox\[, options\]\]) @@ -487,7 +487,7 @@ if (isMainThread) { } ``` -### new Worker(filename[, options]) +### new Worker(filename\[, options\]) * `filename` {string} The path to the Worker’s main script. Must be either an absolute path or a relative path (i.e. relative to the @@ -561,7 +561,7 @@ added: v10.5.0 The `'online'` event is emitted when the worker thread has started executing JavaScript code. -### worker.postMessage(value[, transferList]) +### worker.postMessage(value\[, transferList\]) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index de57a561c361a4..76e1a31974ac85 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -572,7 +572,7 @@ The `zlib.bytesWritten` property specifies the number of bytes written to the engine, before the bytes are processed (compressed or decompressed, as appropriate for the derived class). -### zlib.close([callback]) +### zlib.close(\[callback\]) @@ -581,7 +581,7 @@ added: v0.9.4 Close the underlying handle. -### zlib.flush([kind, ]callback) +### zlib.flush(\[kind, \]callback) @@ -627,7 +627,7 @@ added: v7.0.0 Provides an object enumerating Zlib-related constants. -## zlib.createBrotliCompress([options]) +## zlib.createBrotliCompress(\[options\]) @@ -636,7 +636,7 @@ added: v11.7.0 Creates and returns a new [`BrotliCompress`][] object. -## zlib.createBrotliDecompress([options]) +## zlib.createBrotliDecompress(\[options\]) @@ -645,7 +645,7 @@ added: v11.7.0 Creates and returns a new [`BrotliDecompress`][] object. -## zlib.createDeflate([options]) +## zlib.createDeflate(\[options\]) @@ -654,7 +654,7 @@ added: v0.5.8 Creates and returns a new [`Deflate`][] object. -## zlib.createDeflateRaw([options]) +## zlib.createDeflateRaw(\[options\]) @@ -670,7 +670,7 @@ so Node.js restored the original behavior of upgrading a value of 8 to 9, since passing `windowBits = 9` to zlib actually results in a compressed stream that effectively uses an 8-bit window only. -## zlib.createGunzip([options]) +## zlib.createGunzip(\[options\]) @@ -679,7 +679,7 @@ added: v0.5.8 Creates and returns a new [`Gunzip`][] object. -## zlib.createGzip([options]) +## zlib.createGzip(\[options\]) @@ -689,7 +689,7 @@ added: v0.5.8 Creates and returns a new [`Gzip`][] object. See [example][zlib.createGzip example]. -## zlib.createInflate([options]) +## zlib.createInflate(\[options\]) @@ -698,7 +698,7 @@ added: v0.5.8 Creates and returns a new [`Inflate`][] object. -## zlib.createInflateRaw([options]) +## zlib.createInflateRaw(\[options\]) @@ -707,7 +707,7 @@ added: v0.5.8 Creates and returns a new [`InflateRaw`][] object. -## zlib.createUnzip([options]) +## zlib.createUnzip(\[options\]) @@ -728,7 +728,7 @@ with `callback(error, result)`. Every method has a `*Sync` counterpart, which accept the same arguments, but without a callback. -### zlib.brotliCompress(buffer[, options], callback) +### zlib.brotliCompress(buffer\[, options\], callback) @@ -737,7 +737,7 @@ added: v11.7.0 * `options` {brotli options} * `callback` {Function} -### zlib.brotliCompressSync(buffer[, options]) +### zlib.brotliCompressSync(buffer\[, options\]) @@ -747,7 +747,7 @@ added: v11.7.0 Compress a chunk of data with [`BrotliCompress`][]. -### zlib.brotliDecompress(buffer[, options], callback) +### zlib.brotliDecompress(buffer\[, options\], callback) @@ -756,7 +756,7 @@ added: v11.7.0 * `options` {brotli options} * `callback` {Function} -### zlib.brotliDecompressSync(buffer[, options]) +### zlib.brotliDecompressSync(buffer\[, options\]) @@ -766,7 +766,7 @@ added: v11.7.0 Decompress a chunk of data with [`BrotliDecompress`][]. -### zlib.deflate(buffer[, options], callback) +### zlib.deflate(buffer\[, options\], callback)