src/nodejs/jsmodule

Types

Module = ref object of JsRoot
  builtinModules*: seq[cstring] ## https://nodejs.org/api/module.html#module_module_builtinmodules
  
https://nodejs.org/api/module.html#module_the_module_object

Procs

func findEntry(self: SourceMap; lineNumber: cint; columnNumber: cint): JsObject {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/module.html#module_module_findsourcemap_path
func findSourceMap(path: cstring): SourceMap {.importjs: "module.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/module.html#module_module_findsourcemap_path
func importModule() {.importjs: "import * as module from \'module\'@",
                      ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module
func newSourceMap(payload: JsObject): SourceMap {.
    importjs: "(new SourceMap(#))", ...raises: [], tags: [].}
https://nodejs.org/api/module.html#module_new_sourcemap_payload
func requireModule() {.importjs: "const module = require(\'module\')@",
                       ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module
func syncBuiltinESMExports() {.importjs: "module.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/module.html#module_module_syncbuiltinesmexports