node_modules/@adonisjs/fold/src/Ioc/index.js
/**
   * Requires a file by resolving the autoloaded namespace. It
   * is important to call _isAutoloadedPath before calling
   * this method, to avoid exceptions been thrown.
   *
   * @method _resolveAutoloadedPath
   * @private
   *
   * @param  {String} namespace
   * @return {Mixed}
   */
Requires a file by resolving the autoloaded namespace. It
is important to call _isAutoloadedPath before calling
this method, to avoid exceptions been thrown.



@param  {String} namespace
@return {Mixed}
Requires a file by resolving the autoloaded namespace . It is important to call _isAutoloadedPath before calling this method to avoid exceptions been thrown . @param { String } namespace @return { Mixed }
_resolveAutoloadedPath (namespace) {
    const result = requireStack(this._getAutoloadedPath(namespace))
    if (!result) {
      return result
    }
    const hooks = result.IocHooks || result.iocHooks
    if (!_.isArray(hooks)) {
      return result
    }
    hooks.forEach((hook) => {
      if (_.isFunction(result[hook])) {
        result[hook]()
      }
    })
    return result
  }
_resolveAutoloadedPath ( namespace ) { const result = requireStack ( this . _getAutoloadedPath ( namespace ) ) if ( ! result ) { return result } const hooks = result . IocHooks || result . iocHooks if ( ! _ . isArray ( hooks ) ) { return result } hooks . forEach ( ( hook ) => { if ( _ . isFunction ( result [ hook ] ) ) { result [ hook ] ( ) } } ) return result }
Requires a file by resolving the autoloaded namespace.
Requires a file by resolving the autoloaded namespace .