Require

Require

Source:

Helpers for requiring global & other files

Members

(static) global :Require.requireGlobal

Source:
Type:

(static) require :Require.requireModule

Source:
Type:

Methods

(static) requireGlobal(moduleName) → {any}

Source:

Require a global module

Parameters:
Name Type Description
moduleName string
Returns:

the module required

Type
any

(static) requireModule(moduleName, optionsopt) → {any}

Source:

Require a module from local or global

Parameters:
Name Type Attributes Default Description
moduleName string
options object <optional>
{}
Properties
Name Type Attributes Default Description
useNative boolean <optional>
true

Use local module if available

Returns:

the module required

Type
any

(static) resolve(moduleName, optionsopt) → {string}

Source:

Resolve path of a local or global module

Parameters:
Name Type Attributes Default Description
moduleName string
options object <optional>
{}
Properties
Name Type Attributes Default Description
useNative boolean <optional>
true

Use local module if available

Returns:

path of module

Type
string

(static) resolveGlobal(moduleName) → {string}

Source:

Resolve path of a global module

Parameters:
Name Type Description
moduleName string
Returns:

path of module

Type
string