pattern library

Pattern utilities for use with server.Router.


var router = new Router(server);
router.filter(matchesAny(new UrlPattern(r'/(\w+)'),
    exclude: [new UrlPattern('/login')]), authFilter);


matchAny(Iterable<Pattern> include, {Iterable<Pattern> exclude}) Pattern
Returns a Pattern that matches against every pattern in include and returns all the matches. If the input string matches against any pattern in exclude no matches are returned.
matchesFull(Pattern pattern, String str) bool
Returns true if pattern has a single match in str that matches the whole string, not a substring.