getPlaceholders()function

getPlaceholders(template: string): TemplatePlaceholders
ParamType
templatestring
The template including template placeholders, e.g. :name-${country}/{city} required
Return
TemplatePlaceholders
Array of clean string names of found placeholders, e.g. ["name", "country", "city"]

Get list of placeholders named in a template string.

Examples

getPlaceholders(":name-${country}/{city}") // ["name", "country", "city"]