net_socket.setEncoding()

socket.setEncoding([encoding]) Set the encoding for the socket as a Readable Stream. See stream.setEncoding() for more information.

zlib.gzipSync()

zlib.gzipSync(buf[, options]) Compress a Buffer or string with Gzip.

process.nextTick()

process.nextTick(callback[, arg][, ...]) callback <Function> Once the current event loop turn runs to completion, call the callback function. This is not a simple alias to setTimeout(fn, 0), it's much more efficient. It runs before any additional I/O events (including timers) fire in subsequent ticks of the event loop. console.log('start'); process.nextTick(() => { console.log('nextTick callback'); }); console.log('scheduled'); // Output: // start // scheduled // nextTick callb

diffieHellman.generateKeys()

diffieHellman.generateKeys([encoding]) Generates private and public Diffie-Hellman key values, and returns the public key in the specified encoding. This key should be transferred to the other party. Encoding can be 'binary', 'hex', or 'base64'. If encoding is provided a string is returned; otherwise a Buffer is returned.

message event (ChildProcess)

Event: 'message' message <Object> a parsed JSON object or primitive value. sendHandle <Handle> a net.Socket or net.Server object, or undefined. The 'message' event is triggered when a child process uses process.send() to send messages.

assert.doesNotThrow()

assert.doesNotThrow(block[, error][, message]) Asserts that the function block does not throw an error. See assert.throws() for more details. When assert.doesNotThrow() is called, it will immediately call the block function. If an error is thrown and it is the same type as that specified by the error parameter, then an AssertionError is thrown. If the error is of a different type, or if the error parameter is undefined, the error is propagated back to the caller. The following, for instance,

worker.process

worker.process <ChildProcess> All workers are created using child_process.fork(), the returned object from this function is stored as .process. In a worker, the global process is stored. See: Child Process module Note that workers will call process.exit(0) if the 'disconnect' event occurs on process and .suicide is not true. This protects against accidental disconnection.

process.kill()

process.kill(pid[, signal]) Send a signal to a process. pid is the process id and signal is the string describing the signal to send. Signal names are strings like SIGINT or SIGHUP. If omitted, the signal will be SIGTERM. See Signal Events and kill(2) for more information. Will throw an error if target does not exist, and as a special case, a signal of 0 can be used to test for the existence of a process. Windows platforms will throw an error if the pid is used to kill a process group. Note t

crypto.randomBytes()

crypto.randomBytes(size[, callback]) Generates cryptographically strong pseudo-random data. The size argument is a number indicating the number of bytes to generate. If a callback function is provided, the bytes are generated asynchronously and the callback function is invoked with two arguments: err and buf. If an error occurs, err will be an Error object; otherwise it is null. The buf argument is a Buffer containing the generated bytes. // Asynchronous const crypto = require('crypto'); cryp

fs.realpath()

fs.realpath(path[, cache], callback) Asynchronous realpath(2). The callback gets two arguments (err, resolvedPath). May use process.cwd to resolve relative paths. cache is an object literal of mapped paths that can be used to force a specific path resolution or avoid additional fs.stat calls for known real paths. Example: var cache = {'/etc':'/private/etc'}; fs.realpath('/etc/passwd', cache, (err, resolvedPath) => { if (err) throw err; console.log(resolvedPath); });