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

@param {Listener} listener - The event to load
@returns {Boolean}
@memberof ListenerLoader
Load one event instance in the module . Validate and correct the event before registering it . @param { Listener } listener - The event to load @returns { Boolean } @memberof ListenerLoader
load(listener) {
        if (!(listener instanceof Listener) ) {
            throw new AxonError(`[${listener.toString()}] Not a Listener!`, 'LISTENER-LOADER', this._module.label);
        }
        if (listener.label.includes(' ') ) {
            throw new AxonError(`[${listener.label}] Listener label may not have spaces!`, 'LISTENER-LOADER', this._module.label);
        }
        this.axon.listenerRegistry.register(listener.label, listener);
        return true;
    }
load ( listener ) { if ( ! ( listener instanceof Listener ) ) { throw new AxonError ( ` ${ listener . toString ( ) } ` , 'LISTENER-LOADER' , this . _module . label ) ; } if ( listener . label . includes ( ' ' ) ) { throw new AxonError ( ` ${ listener . label } ` , 'LISTENER-LOADER' , this . _module . label ) ; } this . axon . listenerRegistry . register ( listener . label , listener ) ; return true ; }
Load one event instance in the module.
Load one event instance in the module .