Module quickjs_runtime::quickjs_utils::modules

source ·
Expand description

utils for working with ES6 Modules

Functions§

  • set an export in a JSModuleDef, this should be called BEFORE this init_func(as passed to new_module()) is called
  • compile a module, used for module loading
  • detect if a script is module (contains import or export statements)
  • get the name of an JSModuleDef struct
  • create new Module (JSModuleDef struct) which can be populated with exports after (and from) the init_func
  • set an export in a JSModuleDef, this should be called AFTER the init_func(as passed to new_module()) is called please note that you always need to use this in combination with add_module_export()