Skip to content

Function: getPatternParamNames()

API / @xmachines/play-router / getPatternParamNames

function getPatternParamNames(pattern): string[];

Defined in: play-router/src/framework-params.ts:27

Reads the names of every :param of a route pattern of the route map.

Parameters

ParameterTypeDescription
patternstringA route pattern, for example /profile/:userId.

Returns

string[]

The names, in the order that the pattern declares them. A fresh array, because readPatternParams caches the one it holds.