A flag to know if routes for explicit domains have been registered
Tree of registered routes and their matchit tokens
Add a route to the store
store.add({
pattern: 'post/:id',
methods: ['GET'],
matchers: {},
meta: {},
handler: function handler () {
}
})
The route to add to the store
Current RoutesStore instance for method chaining
Matches the url, method and optionally domain to pull the matching
route. null
is returned when unable to match the URL against
registered routes.
The domain parameter has to be a registered pattern and not the fully
qualified runtime domain. You must call matchDomain
first to fetch
the pattern for qualified domain
The URL to match
HTTP method
Whether to decode parameters
Optional
domain: { tokens: MatchItRouteToken[]; hostname: string }Optional domain tokens and hostname
Matched route or null if no match found
Match hostname against registered domains.
Optional
hostname: null | stringThe hostname to match
Array of matched domain tokens
Store class is used to store a list of routes, along side with their tokens to match the URLs.