Buffer.from()

Class Method: Buffer.from(array) array <Array> Allocates a new Buffer using an array of octets. const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); // creates a new Buffer containing ASCII bytes // ['b','u','f','f','e','r'] A TypeError will be thrown if array is not an Array.

crypto.privateDecrypt()

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

Hash

Class: Hash The Hash class is a utility for creating hash digests of data. It can be used in one of two ways: As a stream that is both readable and writable, where data is written to produce a computed hash digest on the readable side, or Using the hash.update() and hash.digest() methods to produce the computed hash. The crypto.createHash() method is used to create Hash instances. Hash objects are not to be created directly using the new keyword. Example: Using Hash objects as streams: con

listening event (Cluster)

Event: 'listening' worker <cluster.Worker> address <Object> After calling listen() from a worker, when the 'listening' event is emitted on the server, a 'listening' event will also be emitted on cluster in the master. The event handler is executed with two arguments, the worker contains the worker object and the address object contains the following connection properties: address, port and addressType. This is very useful if the worker is listening on more than one address.

module.parent

module.parent <Object> Module object The module that first required this one.

fs.symlink()

fs.symlink(target, path[, type], callback) Asynchronous symlink(2). No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default is 'file') and is only available on Windows (ignored on other platforms). Note that Windows junction points require the destination path to be absolute. When using 'junction', the target argument will automatically be normalized to absolute path. Here is an example below: fs.

fs.access()

fs.access(path[, mode], callback) Tests a user's permissions for the file specified by path. mode is an optional integer that specifies the accessibility checks to be performed. The following constants define the possible values of mode. It is possible to create a mask consisting of the bitwise OR of two or more values. fs.F_OK - File is visible to the calling process. This is useful for determining if a file exists, but says nothing about rwx permissions. Default if no mode is specified. fs

process.versions

process.versions A property exposing version strings of Node.js and its dependencies. console.log(process.versions); Will print something like: { http_parser: '2.3.0', node: '1.1.1', v8: '4.1.0.14', uv: '1.3.0', zlib: '1.2.8', ares: '1.10.0-DEV', modules: '43', icu: '55.1', openssl: '1.0.1k' }

process.getegid()

process.getegid() Note: this function is only available on POSIX platforms (i.e. not Windows, Android) Gets the effective group identity of the process. (See getegid(2).) This is the numerical group id, not the group name. if (process.getegid) { console.log(`Current gid: ${process.getegid()}`); }

replServer.displayPrompt()

replServer.displayPrompt([preserveCursor]) preserveCursor <Boolean> Like readline.prompt except also adding indents with ellipses when inside blocks. The preserveCursor argument is passed to readline.prompt. This is used primarily with defineCommand. It's also used internally to render each prompt line.