new VendorLinker()
Initializes the vendor linker.
Members
-
_modules :Map.<string, Object.<string, *>>
-
Internal storage of loaded modules.
Type:
- Map.<string, Object.<string, *>>
-
_plugins :Array.<Object.<string, *>>
-
Internal storage of loaded IMA plugins.
Type:
- Array.<Object.<string, *>>
Methods
-
bindToNamespace(ns)
-
Binds the vendor modules loaded in this vendor linker to the
Vendor
sub-namespace of the provided namespace.Parameters:
Name Type Description ns
Namespace The namespace to which the vendor modules should be bound.
-
get(moduleName [, imaInternalModule])
-
Returns the provided vendor node module from the internal registry of this vendor linker.
Parameters:
Name Type Argument Description moduleName
string The name of the module.
imaInternalModule
boolean <optional>
<nullable>
Returns:
moduleValues Values exported from the module.
- Type
- Object.<string, *>
-
getImaPlugins()
-
Returns the loaded IMA plugins as an array of export objects.
Returns:
The loaded IMA plugins.
- Type
- Array.<Object.<string, *>>
-
set(moduleName, moduleValues)
-
Sets the provided vendor node module to the internal registry of this vendor linker, and registers an IMA loader module of the same name, exporting the same values.
Parameters:
Name Type Description moduleName
string The name of the module.
moduleValues
Object.<string, *> Values exported from the module.