the name as written in the config, trimmed
what the modules mapping holds for name: a specifier string, or the module itself
Optionalbase: string = ...
directory a relative specifier is resolved against (default process.cwd())
The name as written in the config (after trimming).
What load() imports, when the mapping held a specifier: an absolute
path for a relative specifier, otherwise the specifier unchanged.
undefined when the mapping held the module itself.
The module the mapping held, when it was not a specifier string;
undefined otherwise.
Equal when the name and the target are the same: the same resolved specifier, or the very same provided value.
The module: a specifier is imported now (dynamic import()), a
provided value is handed back as is.
the module namespace object, or the provided value
the name as written
StaticvalidateReturns why name is not an acceptable module name, or null when
it is. name is taken as is: !module trims it first.
The value of a
!module("Name")tagged value (CASC.md ยง7.5) -- a reference to a Node module, by the name the config wrote and the target the application'smodulesload option maps that name to:The reference implementation translates a name into an Elixir module by convention. A Node module is a location, not a name, so there is no convention to translate into here: every name comes from the mapping.
Loading a config never imports anything. A mapping value that is a specifier string is kept in
specifier(a.//../one resolved to an absolute path againstprocess.cwd(), since the mapping is application code, not part of the config file) and imported byload()when, and if, the application asks. Any other mapping value -- an already-imported module or a class -- is kept invalueand handed back byload().