decipher.setAAD()

decipher.setAAD(buffer) When using an authenticated encryption mode (only GCM is currently supported), the cipher.setAAD() method sets the value used for the additional authenticated data (AAD) input parameter.

console.timeEnd()

console.timeEnd(label) Stops a timer that was previously started by calling console.time() and prints the result to stdout: console.time('100-elements'); for (var i = 0; i < 100; i++) { ; } console.timeEnd('100-elements'); // prints 100-elements: 225.438ms

fs.statSync()

fs.statSync(path) Synchronous stat(2). Returns an instance of fs.Stats.

message event (Process)

Event: 'message' message <Object> a parsed JSON object or primitive value sendHandle <Handle object> a net.Socket or net.Server object, or undefined. Messages sent by ChildProcess.send() are obtained using the 'message' event on the child's process object.

Interface

Class: Interface The class that represents a readline interface with an input and output stream.

net_socket.address()

socket.address() Returns the bound address, the address family name and port of the socket as reported by the operating system. Returns an object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }

message event (Worker)

Event: 'message' message <Object> Similar to the cluster.on('message') event, but specific to this worker. This event is the same as the one provided by child_process.fork(). In a worker you can also use process.on('message'). As an example, here is a cluster that keeps count of the number of requests in the master process using the message system: const cluster = require('cluster'); const http = require('http'); if (cluster.isMaster) { // Keep track of http requests var num

exit event (Worker)

Event: 'exit' code <Number> the exit code, if it exited normally. signal <String> the name of the signal (eg. 'SIGHUP') that caused the process to be killed. Similar to the cluster.on('exit') event, but specific to this worker. const worker = cluster.fork(); worker.on('exit', (code, signal) => { if( signal ) { console.log(`worker was killed by signal: ${signal}`); } else if( code !== 0 ) { console.log(`worker exited with error code: ${code}`); } else { cons

error event (ChildProcess)

Event: 'error' err <Error> the error. The 'error' event is emitted whenever: The process could not be spawned, or The process could not be killed, or Sending a message to the child process failed. Note that the 'exit' event may or may not fire after an error has occurred. If you are listening to both the 'exit' and 'error' events, it is important to guard against accidentally invoking handler functions multiple times. See also ChildProcess#kill() and ChildProcess#send().

process.setgroups()

process.setgroups(groups) Note: this function is only available on POSIX platforms (i.e. not Windows, Android) Sets the supplementary group IDs. This is a privileged operation, meaning you need to be root or have the CAP_SETGID capability. The list can contain group IDs, group names or both.