VendorLinker 

Utility for linking vendor node modules with the application by exporting them to the IMA loader’s modules.

Kind: global class


new exports.VendorLinker() 

Initializes the vendor linker.


vendorLinker._modules : Map.<string, Object.<string, \*>> 

Internal storage of loaded modules.

Kind: instance property of VendorLinker


vendorLinker._plugins : Array.<Object.<string, \*>> 

Internal storage of loaded IMA plugins.

Kind: instance property of VendorLinker


vendorLinker.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.

Kind: instance method of VendorLinker

Param Type Description
moduleName string The name of the module.
moduleValues Object.<string, \*> Values exported from the module.

vendorLinker.get(moduleName, [imaInternalModule]) ⇒ Object.<string, \*> 

Returns the provided vendor node module from the internal registry of this vendor linker.

Kind: instance method of VendorLinker
Returns: Object.<string, \*> - moduleValues Values exported from the module.

Param Type Description
moduleName string The name of the module.
[imaInternalModule] boolean  

vendorLinker.clear() ⇒ VendorLinker 

Clears all loaded modules and plugins from this vendor linker.

Kind: instance method of VendorLinker
Returns: VendorLinker - This vendor linker.


vendorLinker.bindToNamespace(ns) 

Binds the vendor modules loaded in this vendor linker to the Vendor sub-namespace of the provided namespace.

Kind: instance method of VendorLinker

Param Type Description
ns Namespace The namespace to which the vendor modules should be bound.

vendorLinker.getImaPlugins() ⇒ Array.<Object.<string, \*>> 

Returns the loaded IMA plugins as an array of export objects.

Kind: instance method of VendorLinker
Returns: Array.<Object.<string, \*>> - The loaded IMA plugins.