message.rawHeaders

message.rawHeaders The raw request/response headers list exactly as they were received. Note that the keys and values are in the same list. It is not a list of tuples. So, the even-numbered offsets are key values, and the odd-numbered offsets are the associated values. Header names are not lowercased, and duplicates are not merged. // Prints something like: // // [ 'user-agent', // 'this is invalid because there can be only one', // 'User-Agent', // 'curl/7.22.0', // 'Host', // '12

setFlagsFromString()

setFlagsFromString(string) Set additional V8 command line flags. Use 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. The V8 options available for a version of Node.js may be determined by running node --v8-options. An unofficial, community-maintained list of options and their effects is available here. Usage: // Print GC events to stdout for one minute. const v8 = require('v8'); v8.setFl

Sign

Class: Sign The Sign Class is a utility for generating signatures. It can be used in one of two ways: As a writable stream, where data to be signed is written and the sign.sign() method is used to generate and return the signature, or Using the sign.update() and sign.sign() methods to produce the signature. The crypto.createSign() method is used to create Sign instances. Sign objects are not to be created directly using the new keyword. Example: Using Sign objects as streams: const crypto

path.delimiter

path.delimiter The platform-specific path delimiter, ; or ':'. An example on *nix: console.log(process.env.PATH) // '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin' process.env.PATH.split(path.delimiter) // returns ['/usr/bin', '/bin', '/usr/sbin', '/sbin', '/usr/local/bin'] An example on Windows: console.log(process.env.PATH) // 'C:\Windows\system32;C:\Windows;C:\Program Files\node\' process.env.PATH.split(path.delimiter) // returns ['C:\\Windows\\system32', 'C:\\Windows', 'C:\\Program File

tls_server.address()

server.address() 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.

fs.writeFile()

fs.writeFile(file, data[, options], callback) file <String> | <Integer> filename or file descriptor data <String> | <Buffer> options <Object> | <String> encoding <String> | <Null> default = 'utf8' mode <Number> default = 0o666 flag <String> default = 'w' callback <Function> Asynchronously writes data to a file, replacing the file if it already exists. data can be a string or a buffer. The encoding option is ignored

rejectionHandled event (Process)

Event: 'rejectionHandled' Emitted whenever a Promise was rejected and an error handler was attached to it (for example with .catch()) later than after an event loop turn. This event is emitted with the following arguments: p the promise that was previously emitted in an 'unhandledRejection' event, but which has now gained a rejection handler. There is no notion of a top level for a promise chain at which rejections can always be handled. Being inherently asynchronous in nature, a promise re

uncaughtException event (Process)

Event: 'uncaughtException' The 'uncaughtException' event is emitted when an exception bubbles all the way back to the event loop. By default, Node.js handles such exceptions by printing the stack trace to stderr and exiting. Adding a handler for the 'uncaughtException' event overrides this default behavior. For example: process.on('uncaughtException', (err) => { console.log(`Caught exception: ${err}`); }); setTimeout(() => { console.log('This will still run.'); }, 500); // Intenti

setup event (Cluster)

Event: 'setup' settings <Object> Emitted every time .setupMaster() is called. The settings object is the cluster.settings object at the time .setupMaster() was called and is advisory only, since multiple calls to .setupMaster() can be made in a single tick. If accuracy is important, use cluster.settings.

util.format()

util.format(format[, ...]) Returns a formatted string using the first argument as a printf-like format. The first argument is a string that contains zero or more placeholders. Each placeholder is replaced with the converted value from its corresponding argument. Supported placeholders are: %s - String. %d - Number (both integer and float). %j - JSON. Replaced with the string '[Circular]' if the argument contains circular references. %% - single percent sign ('%'). This does not consume an