buffer.slice()

buf.slice([start[, end]]) start <Number> Default: 0 end <Number> Default: buffer.length Return: <Buffer> Returns a new Buffer that references the same memory as the original, but offset and cropped by the start and end indices. Note that modifying the new Buffer slice will modify the memory in the original Buffer because the allocated memory of the two objects overlap. Example: build a Buffer with the ASCII alphabet, take a slice, then modify one byte from the original

buffer.readUInt8()

buf.readUInt8(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 1 noAssert <Boolean> Default: false Return: <Number> Reads an unsigned 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. const buf = Buffer.from([1,-2,3,4]); buf.readUInt8(0); // returns 1 buf.readUInt8(1); // returns 254

diffieHellman.getGenerator()

diffieHellman.getGenerator([encoding]) Returns the Diffie-Hellman generator in the specified encoding, which can be 'binary', 'hex', or 'base64'. If encoding is provided a string is returned; otherwise a Buffer is returned.

cluster.isWorker

cluster.isWorker <Boolean> True if the process is not a master (it is the negation of cluster.isMaster).

childprocess.connected

child.connected <Boolean> Set to false after .disconnect is called The child.connected property indicates whether it is still possible to send and receive messages from a child process. When child.connected is false, it is no longer possible to send or receive messages.

crypto.setEngine()

crypto.setEngine(engine[, flags]) Load and set the engine for some or all OpenSSL functions (selected by flags). engine could be either an id or a path to the engine's shared library. The optional flags argument uses ENGINE_METHOD_ALL by default. The flags is a bit field taking one of or a mix of the following flags (defined in the constants module): ENGINE_METHOD_RSA ENGINE_METHOD_DSA ENGINE_METHOD_DH ENGINE_METHOD_RAND ENGINE_METHOD_ECDH ENGINE_METHOD_ECDSA ENGINE_METHOD_CIPHERS ENGINE_MET

buffer.writeUInt16LE()

buf.writeUInt16LE(value, offset[, noAssert]) value <Number> Bytes to be written to Buffer offset <Number> 0 <= offset <= buf.length - 2 noAssert <Boolean> Default: false Return: <Number> The offset plus the number of written bytes Writes value to the Buffer at the specified offset with specified endian format (writeUInt16BE() writes big endian, writeUInt16LE() writes little endian). The value should be a valid unsigned 16-bit integer. Behavior is not defined

util.log()

util.log(string) Output with timestamp on stdout. require('util').log('Timestamped message.');

fs.truncate()

fs.truncate(path, len, callback) Asynchronous truncate(2). No arguments other than a possible exception are given to the completion callback. A file descriptor can also be passed as the first argument. In this case, fs.ftruncate() is called.

buffer.readInt16LE()

buf.readInt16LE(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 2 noAssert <Boolean> Default: false Return: <Number> Reads a signed 16-bit integer from the Buffer at the specified offset with the specified endian format (readInt16BE() returns big endian, readInt16LE() returns little endian). 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 interpre