Skip to main content

StringExpander

Stentor API Reference


Stentor API Reference / stentor-utils/src / StringExpander

Class: StringExpander

Defined in: packages/stentor-utils/src/string/StringExpander.ts:42

Expands strings when the pattern {option0|option1} is found within the string.

If either ${VAR} or the alexa-utterances {-|VAR} is within the string, it preserved and converted to ${} by default.

Constructors​

Constructor​

new StringExpander(props?): StringExpander

Defined in: packages/stentor-utils/src/string/StringExpander.ts:46

Parameters​

props?​

StringExpanderProps

Returns​

StringExpander

Methods​

expand()​

expand(str): string[]

Defined in: packages/stentor-utils/src/string/StringExpander.ts:55

Parameters​

str​

string

Returns​

string[]