UNPKG

@darlean/webgateways-suite

Version:

Web Gateways Suite that acts as Web/API Gateway that invokes actors to serve HTTP requests

20 lines (19 loc) 710 B
/** * Matcher that matches url paths against a certain prefix pattern. * * The prefix pattern can: * * End with `*`: a prefix match is performed. * * End with `+`: similar to the or of a match without the `+` and a match with the `+` replaced by `/*`. * * Otherwise: an exasct match is performed. */ export declare class PathPrefixMatcher { private pattern; constructor(pattern: string); /** * Checks whether path matches this matcher's prefix pattern. * @param path The path to be matched. * @returns Undefined when there is no match, or the remainder of the path when there is * a prefix match. */ match(path: string): string | undefined; }