MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / assertModuleHooks

Function assertModuleHooks

ses.cjs:9155–9162  ·  view source on GitHub ↗
(compartment)

Source from the content-addressed store, hash-verified

9153// However, any method that operates the module system will throw an exception
9154// if these hooks are not available.
9155const assertModuleHooks= (compartment)=>{
9156 const { importHook, resolveHook}= weakmapGet(privateFields, compartment);
9157 if( typeof importHook!== 'function'|| typeof resolveHook!== 'function') {
9158 throw TypeError(
9159 'Compartment must be constructed with an importHook and a resolveHook for it to be able to load modules');
9160
9161 }
9162 };
9163
9164const InertCompartment= function Compartment(
9165 _endowments= {},

Callers 4

moduleFunction · 0.85
importFunction · 0.85
loadFunction · 0.85
importNowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected