Skip to content

replacePathTokens()

PromptScript API


replacePathTokens(text, values): object

Defined in: core/src/utils/path-tokens.ts:33

Replace {{prs.dotDir}}, {{prs.skillsDir}} and {{prs.skillDir}} with the given values. Escaped \{{prs.dotDir}} is written as {{prs.dotDir}}.

Parameters

text

string

values

PathTokenValues

Returns

object

The new text and the names of tokens left without a value.

text

text: string

unresolved

unresolved: ("dotDir" | "skillsDir" | "skillDir")[]