MCPcopy Index your code
hub / github.com/nodejs/node / register

Function register

lib/internal/process/finalization.js:102–107  ·  view source on GitHub ↗

* Execute the given function when the process exits, * and clean things up when the object is gc. * @param {any} obj * @param {Function} fn

(obj, fn)

Source from the content-addressed store, hash-verified

100 * @param {Function} fn
101 */
102 function register(obj, fn) {
103 emitExperimentalWarning('process.finalization.register');
104 validateObject(obj, 'obj', kValidateObjectAllowFunction);
105
106 _register('exit', obj, fn);
107 }
108
109 /**
110 * Execute the given function before the process exits,

Callers

nothing calls this directly

Calls 2

emitExperimentalWarningFunction · 0.85
_registerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…