• function

A loader hook that converts a moduleIdentifier into a moduleName to serve as the canonical key for a module.

normalize(name, parentName, parentAddress)


  1. name {String}

    The moduleIdentifier provided in the import, require() or similar call depending on the module syntax used.

  2. parentName {String}Optional

    The moduleName of the parent module; the module that is doing the importing.

  3. parentAddress {String}Optional

    The address (as determined in locate) of the parent module.


{Promise | String}

The string moduleName as determined by applying the normalize algorithm, or a Promise that will resolve with the moduleName.

The normalize hook is used to convert a moduleIdentifier from a given context and, using the normalization algorithm, to a canonical moduleName.

Help us improve StealJS by taking our community survey