Namespace 

Deprecated

Namespace creation, manipulation and traversal utility. This utility is used to create semi-global shared namespaces for registering references to interfaces, classes and constants of the application to provide access to each other more easily than by using the ES6 import/export mechanism.

Kind: global class


new exports.Namespace() 

Initializes the namespace provider.

This is a private constructor, you should use the exported ns instance to create and use namespaces (see the examples).


namespace.namespace(path) ⇒ \* 

Deprecated

Verifies that the specified path in namespace exists, creates it if it does not, and returns the value at the specified path in the namespace.

The method recursively creates all path parts in the namespaces as empty plain objects for all path parts that do not exist yet, including the last one. This means, that if called with a non-existing namespace path as an argument, the return value will be the last created namespace object.

Kind: instance method of Namespace
Returns: \* - The value at the specified path in the namespace.

Param Type Description
path string The namespace path.

namespace.has(path) ⇒ boolean 

Verifies that the specified namespace path point to an existing namespace or terminal value.

Kind: instance method of Namespace
Returns: boolean - true if the namespace or terminal value exists at the specified path.

Param Type Description
path string The namespace path to test.

namespace.get(path) ⇒ \* 

Return value for the specified namespace path point.

Kind: instance method of Namespace
Returns: \* - The value at the specified path in the namespace.

Param Type Description
path string The namespace path to test.