SIGINT event (Readline)

Event: 'SIGINT' function () {} Emitted whenever the input stream receives a ^C, respectively known as SIGINT. If there is no SIGINT event listener present when the input stream receives a SIGINT, pause will be triggered. Example of listening for SIGINT: rl.on('SIGINT', () => { rl.question('Are you sure you want to exit?', (answer) => { if (answer.match(/^y(es)?$/i)) rl.pause(); }); });

setTimeout()

setTimeout(callback, delay[, arg][, ...]) Schedules execution of a one-time callback after delay milliseconds. Returns a timeoutObject for possible use with clearTimeout. Additional optional arguments may be passed to the callback. The callback will likely not be invoked in precisely delay milliseconds. Node.js makes no guarantees about the exact timing of when callbacks will fire, nor of their ordering. The callback will be called as close as possible to the time specified. To follow browser

SIGCONT event (Readline)

Event: 'SIGCONT' function () {} This does not work on Windows. Emitted whenever the input stream is sent to the background with ^Z, respectively known as SIGTSTP, and then continued with fg(1). This event only emits if the stream was not paused before sending the program to the background. Example of listening for SIGCONT: rl.on('SIGCONT', () => { // `prompt` will automatically resume the stream rl.prompt(); });

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.

setImmediate()

setImmediate(callback[, arg][, ...]) Schedules "immediate" execution of callback after I/O events' callbacks and before timers set by setTimeout and setInterval are triggered. Returns an immediateObject for possible use with clearImmediate. Additional optional arguments may be passed to the callback. Callbacks for immediates are queued in the order in which they were created. The entire callback queue is processed every event loop iteration. If an immediate is queued from inside an executing c

secureConnection event (tls.Server)

Event: 'secureConnection' function (tlsSocket) {} This event is emitted after the handshaking process for a new connection has successfully completed. The argument is an instance of tls.TLSSocket and has all the common stream methods and events. socket.authorized is a boolean value which indicates if the client has been verified by one of the supplied certificate authorities for the server. If socket.authorized is false, then socket.authorizationError is set to describe how authorization fail

SecurePair

Class: SecurePair Returned by tls.createSecurePair.

setInterval()

setInterval(callback, delay[, arg][, ...]) Schedules repeated execution of callback every delay milliseconds. Returns a intervalObject for possible use with clearInterval. Additional optional arguments may be passed to the callback. To follow browser behavior, when using delays larger than 2147483647 milliseconds (approximately 25 days) or less than 1, Node.js will use 1 as the delay.

setFlagsFromString()

setFlagsFromString(string) Set additional V8 command line flags. Use with care; changing settings after the VM has started may result in unpredictable behavior, including crashes and data loss. Or it may simply do nothing. The V8 options available for a version of Node.js may be determined by running node --v8-options. An unofficial, community-maintained list of options and their effects is available here. Usage: // Print GC events to stdout for one minute. const v8 = require('v8'); v8.setFl

script.runInThisContext()

script.runInThisContext([options]) Similar to vm.runInThisContext() but a method of a precompiled Script object. script.runInThisContext() runs script's compiled code and returns the result. Running code does not have access to local scope, but does have access to the current global object. Example of using script.runInThisContext() to compile code once and run it multiple times: const vm = require('vm'); global.globalVar = 0; const script = new vm.Script('globalVar += 1', { filename: 'myfi