Header menu logo Navs

RouteMatcher Module

Functions and values

Function or value Description

RouteMatcher.matchStrings template url

Full Usage: RouteMatcher.matchStrings template url

Parameters:
    template : string - The template to match the URL against
    url : string - The URL to match

Returns: Validation<(UrlTemplate * UrlInfo * UrlMatch), StringMatchError> A validation that contains the UrlTemplate obtained from the provided string, the matched URL, and the match result if the URL matches the template or a list of StringMatchErrors if there were problems parsing the template, the URL or if the URL doesn't match the template.

Matches a URL against a templated string

template : string

The template to match the URL against

url : string

The URL to match

Returns: Validation<(UrlTemplate * UrlInfo * UrlMatch), StringMatchError>

A validation that contains the UrlTemplate obtained from the provided string, the matched URL, and the match result if the URL matches the template or a list of StringMatchErrors if there were problems parsing the template, the URL or if the URL doesn't match the template.

RouteMatcher.matchTemplate template url

Full Usage: RouteMatcher.matchTemplate template url

Parameters:
    template : UrlTemplate - The template to match the URL against
    url : UrlInfo - The URL to match

Returns: Validation<UrlMatch, MatchingError> A validation that contains the matched URL and the match result if the URL matches the template or a list of MatchingErrors if the URL doesn't match the template.

Matches a URL against a template

template : UrlTemplate

The template to match the URL against

url : UrlInfo

The URL to match

Returns: Validation<UrlMatch, MatchingError>

A validation that contains the matched URL and the match result if the URL matches the template or a list of MatchingErrors if the URL doesn't match the template.

RouteMatcher.matchUrl template url

Full Usage: RouteMatcher.matchUrl template url

Parameters:
    template : UrlTemplate - The template to match the URL against
    url : string - The URL to match

Returns: Validation<(UrlInfo * UrlMatch), StringMatchError> A validation that contains the matched URL and the match result if the URL matches the template or a list of MatchingErrors if the URL doesn't match the template.

Matches a URL against a template

template : UrlTemplate

The template to match the URL against

url : string

The URL to match

Returns: Validation<(UrlInfo * UrlMatch), StringMatchError>

A validation that contains the matched URL and the match result if the URL matches the template or a list of MatchingErrors if the URL doesn't match the template.

Type something to start searching.