fs.fchmodSync()

fs.fchmodSync(fd, mode) Synchronous fchmod(2). Returns undefined.

http.ServerResponse

Class: http.ServerResponse This object is created internally by a HTTP server--not by the user. It is passed as the second parameter to the 'request' event. The response implements the Writable Stream interface. This is an EventEmitter with the following events:

response.writeHead()

response.writeHead(statusCode[, statusMessage][, headers]) Sends a response header to the request. The status code is a 3-digit HTTP status code, like 404. The last argument, headers, are the response headers. Optionally one can give a human-readable statusMessage as the second argument. Example: var body = 'hello world'; response.writeHead(200, { 'Content-Length': body.length, 'Content-Type': 'text/plain' }); This method must only be called once on a message and it must be called before

unhandledRejection event (Process)

Event: 'unhandledRejection' Emitted whenever a Promise is rejected and no error handler is attached to the promise within a turn of the event loop. When programming with promises exceptions are encapsulated as rejected promises. Such promises can be caught and handled using promise.catch(...) and rejections are propagated through a promise chain. This event is useful for detecting and keeping track of promises that were rejected whose rejections were not handled yet. This event is emitted with

buffer.writeFloatLE()

buf.writeFloatLE(value, offset[, noAssert]) value <Number> Bytes to be written to Buffer offset <Number> 0 <= offset <= buf.length - 4 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 (writeFloatBE() writes big endian, writeFloatLE() writes little endian). Behavior is not defined when value is anything other than a 32-bit float. Set n

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.

buffer.keys()

buf.keys() Return: <Iterator> Creates and returns an iterator of Buffer keys (indices). const buf = Buffer.from('buffer'); for (var key of buf.keys()) { console.log(key); } // prints: // 0 // 1 // 2 // 3 // 4 // 5

path.dirname()

path.dirname(p) Return the directory name of a path. Similar to the Unix dirname command. Example: path.dirname('/foo/bar/baz/asdf/quux') // returns '/foo/bar/baz/asdf'

worker.kill()

worker.kill([signal='SIGTERM']) signal <String> Name of the kill signal to send to the worker process. This function will kill the worker. In the master, it does this by disconnecting the worker.process, and once disconnected, killing with signal. In the worker, it does it by disconnecting the channel, and then exiting with code 0. Causes .suicide to be set. This method is aliased as worker.destroy() for backwards compatibility. Note that in a worker, process.kill() exists, but it i

module.parent

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