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

Function enqueue

lib/internal/freeze_intrinsics.js:429–444  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

427 // If val is something we should be freezing but aren't yet,
428 // add it to freezingSet.
429 function enqueue(val) {
430 if (Object(val) !== val) {
431 // ignore primitives
432 return;
433 }
434 const type = typeof val;
435 if (type !== 'object' && type !== 'function') {
436 // NB: handle for any new cases in future
437 }
438 if (frozenSet.has(val) || freezingSet.has(val)) {
439 // TODO: Use uncurried form
440 // Ignore if already frozen or freezing
441 return;
442 }
443 freezingSet.add(val); // TODO: Use uncurried form
444 }
445
446 function doFreeze(obj) {
447 // Immediately freeze the object to ensure reactive

Callers 2

doFreezeFunction · 0.70
innerDeepFreezeFunction · 0.70

Calls 3

ObjectFunction · 0.85
hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…