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

Function _register

lib/internal/process/finalization.js:84–94  ·  view source on GitHub ↗
(event, obj, fn)

Source from the content-addressed store, hash-verified

82 }
83
84 function _register(event, obj, fn) {
85 install(event);
86
87 const ref = new SafeWeakRef(obj);
88 ref.fn = fn;
89
90 registry ||= new SafeFinalizationRegistry(clear);
91 registry.register(obj, ref);
92
93 ArrayPrototypePush(refs[event], ref);
94 }
95
96 /**
97 * Execute the given function when the process exits,

Callers 2

registerFunction · 0.85
registerBeforeExitFunction · 0.85

Calls 2

installFunction · 0.70
registerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…