Module: @aofl/router

Exports Router and routerInstance
Version:
  • 3.0.0
Since:
  • 1.0.0
Author:
Source:

Classes

PathUtils
Router

Members


<static, constant> routerInstance :Router

Persistent instance of Router.
Type:
  • Router
Source:

Methods


<static> matchBestPath(_path, routes)

Evaluates and returns the best matching route for the given path
Parameters:
Name Type Description
_path String
routes Array
Source:
Returns:
Type
Object

<static> module.exports(router)

Adds the match route before middleware logic
Parameters:
Name Type Description
router Object
Source:
Returns:
Type
function

<static> redirectMiddleware(router)

Detect if a redirect has occured and rests the middleware to the beginning of beforeEach.
Parameters:
Name Type Description
router Router
Source:
Returns:
Type
function