request.setTimeout()

request.setTimeout(timeout[, callback]) Once a socket is assigned to this request and is connected socket.setTimeout() will be called. timeout {Number} Milliseconds before a request is considered to be timed out. callback {Function} Optional function to be called when a timeout occurs. Same as binding to the timeout event.

process.getgid()

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

assert.notDeepEqual()

assert.notDeepEqual(actual, expected[, message]) Tests for any deep inequality. Opposite of assert.deepEqual(). const assert = require('assert'); const obj1 = { a : { b : 1 } }; const obj2 = { a : { b : 2 } }; const obj3 = { a : { b : 1 } } const obj4 = Object.create(obj1); assert.notDeepEqual(obj1, obj1); // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } assert.notDeepEqual(obj1, obj2); // OK, obj1 and obj2 are not deeply equal assert.notDeepEqual

assert.deepStrictEqual()

assert.deepStrictEqual(actual, expected[, message]) Generally identical to assert.deepEqual() with two exceptions. First, primitive values are compared using the strict equality operator ( === ). Second, object comparisons include a strict equality check of their prototypes. const assert = require('assert'); assert.deepEqual({a:1}, {a:'1'}); // OK, because 1 == '1' assert.deepStrictEqual({a:1}, {a:'1'}); // AssertionError: { a: 1 } deepStrictEqual { a: '1' } // because 1 !== '1' using

listening event (net.Server)

Event: 'listening' Emitted when the server has been bound after calling server.listen.

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.

path.extname()

path.extname(p) Return the extension of the path, from the last '.' to end of string in the last portion of the path. If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. Examples: path.extname('index.html') // returns '.html' path.extname('index.coffee.md') // returns '.md' path.extname('index.') // returns '.' path.extname('index') // returns '' path.extname('.index') // returns ''

fs.createWriteStream()

fs.createWriteStream(path[, options]) Returns a new WriteStream object. (See Writable Stream). options is an object or string with the following defaults: { flags: 'w', defaultEncoding: 'utf8', fd: null, mode: 0o666, autoClose: true } options may also include a start option to allow writing data at some position past the beginning of the file. Modifying a file rather than replacing it may require a flags mode of r+ rather than the default mode w. The defaultEncoding can be any one o

ECDH

Class: ECDH The ECDH class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) key exchanges. Instances of the ECDH class can be created using the crypto.createECDH() function. const crypto = require('crypto'); const assert = require('assert'); // Generate Alice's keys... const alice = crypto.createECDH('secp521r1'); const alice_key = alice.generateKeys(); // Generate Bob's keys... const bob = crypto.createECDH('secp521r1'); const bob_key = bob.generateKeys(); // Exchange and ge

ecdh.getPublicKey()

ecdh.getPublicKey([encoding[, format]]) Returns the EC Diffie-Hellman public key in the specified encoding and format. The format argument specifies point encoding and can be 'compressed', 'uncompressed', or 'hybrid'. If format is not specified the point will be returned in 'uncompressed' format. The encoding argument can be 'binary', 'hex', or 'base64'. If encoding is specified, a string is returned; otherwise a Buffer is returned.