Skip to content

Function: getCandidates()

API / @xmachines/play-url / index / getCandidates

function getCandidates<T>(patternBuckets, indexKey): T[];

Defined in: packages/play-url/src/url-pattern-utils.ts:214

Joins the bucket of the named segment and the wildcard bucket of one index key. The order of the insertion stays, through the order field.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterTypeDescription
patternBucketsMap<string, T[]>The map from a bucket key to its ordered pattern entries
indexKeystringThe key of the first segment, from getIndexKey

Returns

T[]