stream.Readable

Class: stream.Readable stream.Readable is an abstract class designed to be extended with an underlying implementation of the stream._read(size) method. Please see API for Stream Consumers for how to consume streams in your programs. What follows is an explanation of how to implement Readable streams in your programs. new stream.Readable([options]) options <Object> highWaterMark <Number> The maximum number of bytes to store in the internal buffer before ceasing to read from the u

util.isUndefined()

util.isUndefined(object) Stability: 0 - Deprecated Returns true if the given "object" is undefined. Otherwise, returns false. const util = require('util'); var foo; util.isUndefined(5) // false util.isUndefined(foo) // true util.isUndefined(null) // false

readable.push()

Stability: 2 - Stable A stream is an abstract interface implemented by various objects in Node.js. For example a request to an HTTP server is a stream, as is process.stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter. You can load the Stream base classes by doing require('stream'). There are base classes provided for Readable streams, Writable streams, Duplex streams, and Transform streams. This document is split up into 3 sections: The first section e

setup event (Cluster)

Event: 'setup' settings <Object> Emitted every time .setupMaster() is called. The settings object is the cluster.settings object at the time .setupMaster() was called and is advisory only, since multiple calls to .setupMaster() can be made in a single tick. If accuracy is important, use cluster.settings.

stream.read()

stream.read(0) There are some cases where you want to trigger a refresh of the underlying readable stream mechanisms, without actually consuming any data. In that case, you can call stream.read(0), which will always return null. If the internal read buffer is below the highWaterMark, and the stream is not currently reading, then calling stream.read(0) will trigger a low-level stream._read() call. There is almost never a need to do this. However, you will see some cases in Node.js's internals

zlib.inflateRaw()

zlib.inflateRaw(buf[, options], callback)

process.platform

process.platform What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32' console.log(`This platform is ${process.platform}`);

tls_server.addContext()

server.addContext(hostname, context) Add secure context that will be used if the client request's SNI hostname matches the supplied hostname (wildcards can be used). context can contain key, cert, ca or any other properties from tls.createSecureContext() options argument.

eventemitter.listenerCount()

emitter.listenerCount(eventName) eventName <Value> The name of the event being listened for Returns the number of listeners listening to the event named eventName.

response.statusCode

response.statusCode When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed. Example: response.statusCode = 404; After response header was sent to the client, this property indicates the status code which was sent out.