assert.fail()

assert.fail(actual, expected, message, operator) Throws an AssertionError. If message is falsy, the error message is set as the values of actual and expected separated by the provided operator. Otherwise, the error message is the value of message. const assert = require('assert'); assert.fail(1, 2, undefined, '>'); // AssertionError: 1 > 2 assert.fail(1, 2, 'whoops', '>'); // AssertionError: whoops

ref()

ref() If a timer was previously unref()d, then ref() can be called to explicitly request the timer hold the program open. If the timer is already refd calling ref again will have no effect. Returns the timer.

data event (stream.Readable)

Stability: 2 - Stable A stream is an abstract interface implemented by various objects in Node.js. For example a request to an HTTP server is a stream, as is process.stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter. You can load the Stream base classes by doing require('stream'). There are base classes provided for Readable streams, Writable streams, Duplex streams, and Transform streams. This document is split up into 3 sections: The first section e

worker.id

worker.id <Number> Each new worker is given its own unique id, this id is stored in the id. While a worker is alive, this is the key that indexes it in cluster.workers

https.Server

Class: https.Server This class is a subclass of tls.Server and emits events same as http.Server. See http.Server for more information.

process.getgroups()

process.getgroups() Note: this function is only available on POSIX platforms (i.e. not Windows, Android) Returns an array with the supplementary group IDs. POSIX leaves it unspecified if the effective group ID is included but Node.js ensures it always is.

eventemitter.addListener()

emitter.addListener(eventName, listener) Alias for emitter.on(eventName, listener).

readable.read()

Stability: 2 - Stable A stream is an abstract interface implemented by various objects in Node.js. For example a request to an HTTP server is a stream, as is process.stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter. You can load the Stream base classes by doing require('stream'). There are base classes provided for Readable streams, Writable streams, Duplex streams, and Transform streams. This document is split up into 3 sections: The first section e

interface.prompt()

rl.prompt([preserveCursor]) Readies readline for input from the user, putting the current setPrompt options on a new line, giving the user a new spot to write. Set preserveCursor to true to prevent the cursor placement being reset to 0. 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, the prompt is not written.

crypto.publicDecrypt()

crypto.publicDecrypt(public_key, buffer) Decrypts buffer with public_key. public_key can be an object or a string. If public_key is a string, it is treated as the key with no passphrase and will use RSA_PKCS1_PADDING. If public_key is an object, it is interpreted as a hash object with the keys: key : {String} - PEM encoded public key passphrase : {String} - Optional passphrase for the private key padding : An optional padding value, one of the following:constants.RSA_NO_PADDING constants.R