src/Core/Loaders/ModuleLoader.js
/**
     * Load one module instance in the client.
     * Validate and correct the module before registering it.
     *
     * @param {Module} module - The module to load
     * @returns {Boolean}
     * @memberof ModuleLoader
     */
Load one module instance in the client.
Validate and correct the module before registering it.

@param {Module} module - The module to load
@returns {Boolean}
@memberof ModuleLoader
Load one module instance in the client . Validate and correct the module before registering it . @param { Module } module - The module to load @returns { Boolean } @memberof ModuleLoader
load(module) {
        if (!(module instanceof Module) ) {
            throw new AxonError('Not a Module!', 'MODULE-LOADER', module.toString() );
        }
        if (module.label.includes(' ') ) {
            throw new AxonError('Module label may not have spaces!', 'MODULE-LOADER', module.label);
        }
        if (!Validator.validModule(module) ) {
            throw new AxonError(`[${module.label}] Invalid Module (enable debugMode)!`, 'MODULE-LOADER', module.label);
        }
        this.axon.moduleRegistry.register(module.label, module);
        return true;
    }
load ( module ) { if ( ! ( module instanceof Module ) ) { throw new AxonError ( 'Not a Module!' , 'MODULE-LOADER' , module . toString ( ) ) ; } if ( module . label . includes ( ' ' ) ) { throw new AxonError ( 'Module label may not have spaces!' , 'MODULE-LOADER' , module . label ) ; } if ( ! Validator . validModule ( module ) ) { throw new AxonError ( ` ${ module . label } ` , 'MODULE-LOADER' , module . label ) ; } this . axon . moduleRegistry . register ( module . label , module ) ; return true ; }
Load one module instance in the client.
Load one module instance in the client .