module:bajaux/registry/RegistryEntry

module:bajaux/registry/RegistryEntry

An entry intended to be stored in a local Registry, representing a single
RequireJS module. Additional parameters can be used to store metadata
about this module, allowing it to be queried later in more detail.

There is usually no reason to instantiate this class directly;
a Registry will create them as needed.

Constructor

new (require("bajaux/registry/RegistryEntry"))(params)

Source:
Since:
  • Niagara 4.10
Parameters:
Name Type Description
params module:bajaux/registry/Registry~QueryParams

Methods

getJsDependencies() → {Array.<Array.<String>>}

Description:
  • Get the list of RequireJS dependencies (typically builtfiles) that must
    be loaded before requiring the main RequireJS ID.

Source:
Returns:
Type
Array.<Array.<String>>

getJsId() → {string}

Description:
  • Get the RequireJS ID for this entry.

Source:
Returns:
Type
string

getTags() → {Array.<String>}

Description:
  • Get a list of tags that serve as metadata for this entry.

Source:
Returns:
Type
Array.<String>

matches(paramsopt) → {boolean}

Description:
  • Check to see if this entry's metadata matches a registry query.

Source:
Parameters:
Name Type Attributes Description
params module:bajaux/registry/Registry~QueryParams | module:bajaux/registry/RegistryEntry <optional>
Returns:

true if this entry matches the query parameters and
so should be included in the results

Type
boolean

resolve() → {Promise}

Description:
  • Resolve the RequireJS module (and any dependencies) that is represented
    by this module.

Source:
Returns:

promise to be resolved with the contents of
the RequireJS module, or rejected if the module ID or any of its
dependencies could not be loaded

Type
Promise

toJSON() → {Object|undefined}

Description:
  • Return a raw object representation of this entry. As a contractual
    requirement, the output of this function should be able to be passed right
    back to the constructor to create a new instance. Return undefined to
    indicate that this entry should never be serialized.

Source:
Returns:
Type
Object | undefined