Page Contents
Home > @loopback/rest > getPathVariables
getPathVariables() function
Get all path variables. For example, /root/{foo}/bar => ['foo']
Signature:
export declare function getPathVariables(path: string): RegExpMatchArray | null;
Parameters
| Parameter | Type | Description |
|---|---|---|
| path | string |
Returns:
RegExpMatchArray | null