request.abort()

request.abort() Marks the request as aborting. Calling this will cause remaining data in the response to be dropped and the socket to be destroyed.

request event (http.Server)

Event: 'request' function (request, response) { } Emitted each time there is a request. Note that there may be multiple requests per connection (in the case of keep-alive connections). request is an instance of http.IncomingMessage and response is an instance of http.ServerResponse.

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.

replServer.defineCommand()

replServer.defineCommand(keyword, cmd) keyword <String> cmd <Object> | <Function> Makes a command available in the REPL. The command is invoked by typing a . followed by the keyword. The cmd is an object with the following values: help - help text to be displayed when .help is entered (Optional). action - a function to execute, potentially taking in a string argument, when the command is invoked, bound to the REPLServer instance (Required). If a function is provided

REPLServer

Class: REPLServer This inherits from Readline Interface with the following events:

repl.start()

repl.start([options]) Returns and starts a REPLServer instance, that inherits from Readline Interface. Accepts an "options" Object that takes the following values: prompt - the prompt and stream for all I/O. Defaults to > . input - the readable stream to listen to. Defaults to process.stdin. output - the writable stream to write readline data to. Defaults to process.stdout. terminal - pass true if the stream should be treated like a TTY, and have ANSI/VT100 escape codes written to it

removeListener event (EventEmitter)

Event: 'removeListener' eventName <String> | <Symbol> The event name listener <Function> The event handler function The 'removeListener' event is emitted after a listener is removed.

rejectionHandled event (Process)

Event: 'rejectionHandled' Emitted whenever a Promise was rejected and an error handler was attached to it (for example with .catch()) later than after an event loop turn. This event is emitted with the following arguments: p the promise that was previously emitted in an 'unhandledRejection' event, but which has now gained a rejection handler. There is no notion of a top level for a promise chain at which rejections can always be handled. Being inherently asynchronous in nature, a promise re

ReferenceError

Class: ReferenceError A subclass of Error that indicates that an attempt is being made to access a variable that is not defined. Such errors commonly indicate typos in code, or an otherwise broken program. While client code may generate and propagate these errors, in practice, only V8 will do so. doesNotExist; // throws ReferenceError, doesNotExist is not a variable in this program. ReferenceError instances will have an error.arguments property whose value is an array containing a single el

ref()

ref() If a timer was previously unref()d, then ref() can be called to explicitly request the timer hold the program open. If the timer is already refd calling ref again will have no effect. Returns the timer.