domain.bind()

domain.bind(callback) callback <Function> The callback function return: <Function> The bound function The returned function will be a wrapper around the supplied callback function. When the returned function is called, any errors that are thrown will be routed to the domain's 'error' event. Example const d = domain.create(); function readSomeFile(filename, cb) { fs.readFile(filename, 'utf8', d.bind((er, data) => { // if this throws, it will also be passed to the domain

response.addTrailers()

response.addTrailers(headers) This method adds HTTP trailing headers (a header but at the end of the message) to the response. Trailers will only be emitted if chunked encoding is used for the response; if it is not (e.g., if the request was HTTP/1.0), they will be silently discarded. Note that HTTP requires the Trailer header to be sent if you intend to emit trailers, with a list of the header fields in its value. E.g., response.writeHead(200, { 'Content-Type': 'text/plain',

buffer.equals()

buf.equals(otherBuffer) otherBuffer <Buffer> Return: <Boolean> Returns a boolean indicating whether this and otherBuffer have exactly the same bytes. const buf1 = Buffer.from('ABC'); const buf2 = Buffer.from('414243', 'hex'); const buf3 = Buffer.from('ABCD'); console.log(buf1.equals(buf2)); // Prints: true console.log(buf1.equals(buf3)); // Prints: false

buffer.readInt8()

buf.readInt8(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 1 noAssert <Boolean> Default: false Return: <Number> Reads a signed 8-bit integer from the Buffer at the specified offset. Setting noAssert to true skips validation of the offset. This allows the offset to be beyond the end of the Buffer. Integers read from the Buffer are interpreted as two's complement signed values. const buf = Buffer.from([1,-2,3,4]); buf.readInt8(0); // returns 1

tlsSocket.authorizationError

tlsSocket.authorizationError The reason why the peer's certificate has not been verified. This property becomes available only when tlsSocket.authorized === false.

exit event (ChildProcess)

Event: 'exit' code <Number> the exit code if the child exited on its own. signal <String> the signal by which the child process was terminated. The 'exit' event is emitted after the child process ends. If the process exited, code is the final exit code of the process, otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null. One of the two will always be non-null. Note that when the 'exit' event is triggered,

zlib.inflateSync()

zlib.inflateSync(buf[, options]) Decompress a Buffer or string with Inflate.

verifier.verify()

verifier.verify(object, signature[, signature_format]) Verifies the provided data using the given object and signature. The object argument is a string containing a PEM encoded object, which can be one an RSA public key, a DSA public key, or an X.509 certificate. The signature argument is the previously calculated signature for the data, in the signature_format which can be 'binary', 'hex' or 'base64'. If a signature_format is specified, the signature is expected to be a string; otherwise signa

domain.create()

domain.create() return: <Domain> Returns a new Domain object.

interface.question()

rl.question(query, callback) Prepends the prompt with query and invokes callback with the user's response. Displays the query to the user, and then invokes callback with the user's response after it has been typed. This will also resume the input stream used with createInterface if it has been paused. If output is set to null or undefined when calling createInterface, nothing is displayed. Example usage: rl.question('What is your favorite food?', (answer) => { console.log(`Oh, so your