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

Function wrapIdSetter

lib/internal/bootstrap/switches/does_own_process_state.js:81–91  ·  view source on GitHub ↗
(type, method)

Source from the content-addressed store, hash-verified

79 }
80
81 function wrapIdSetter(type, method) {
82 return function(id) {
83 validateId(id, 'id');
84 if (typeof id === 'number') id >>>= 0;
85 // Result is 0 on success, 1 if credential is unknown.
86 const result = method(id);
87 if (result === 1) {
88 throw new ERR_UNKNOWN_CREDENTIAL(type, id);
89 }
90 };
91 }
92
93 function validateId(id, name) {
94 if (typeof id === 'number') {

Callers 1

Calls 2

validateIdFunction · 0.85
methodFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…