MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxPushModuleOptions

Function fxPushModuleOptions

xs/sources/xsModule.c:256–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void fxPushModuleOptions(txMachine* the, txFlag moduleFlag)
257{
258#if mxECMAScript2025
259 if (moduleFlag & XS_JSON_MODULE_FLAG) {
260 txSlot* optionsInstance = fxNewObject(the);
261 txSlot* withInstance = fxNewObject(the);
262 fxNextSlotProperty(the, optionsInstance, the->stack, mxID(_with), XS_NO_FLAG);
263 mxPop();
264 fxNextStringProperty(the, withInstance, "json", mxID(_type), XS_NO_FLAG);
265 }
266 else
267#endif
268 mxPushUndefined();
269}
270
271txFlag fxCheckModuleOptions(txMachine* the, txSlot* options)
272{

Callers 4

fxLoadModulesFunction · 0.85
fxRunImportNowFunction · 0.85
fxImportModuleStuffFunction · 0.85

Calls 3

fxNewObjectFunction · 0.85
fxNextSlotPropertyFunction · 0.85
fxNextStringPropertyFunction · 0.85

Tested by

no test coverage detected