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

Function validatePrecompiledStaticModuleRecord

ses.cjs:8995–9008  ·  view source on GitHub ↗
(
  staticModuleRecord,
  moduleSpecifier)

Source from the content-addressed store, hash-verified

8993 }
8994
8995function validatePrecompiledStaticModuleRecord(
8996 staticModuleRecord,
8997 moduleSpecifier)
8998 {
8999 const { __fixedExportMap__, __liveExportMap__}= staticModuleRecord;
9000 isObject(__fixedExportMap__)||
9001 Fail `Property '__fixedExportMap__' of a precompiled module record must be an object, got ${q(
9002 __fixedExportMap__)
9003 }, for module ${q(moduleSpecifier)}`;
9004 isObject(__liveExportMap__)||
9005 Fail `Property '__liveExportMap__' of a precompiled module record must be an object, got ${q(
9006 __liveExportMap__)
9007 }, for module ${q(moduleSpecifier)}`;
9008 }
9009
9010function isThirdParty(staticModuleRecord) {
9011 return typeof staticModuleRecord.execute=== 'function';

Callers 1

instantiateFunction · 0.85

Calls 2

FailFunction · 0.85
isObjectFunction · 0.70

Tested by

no test coverage detected