alexa-js / alexa-utterances

generate expanded utterances for Amazon Alexa from a template string
MIT License
152 stars 28 forks source link

Optional custom slot #34

Open jacobweber opened 5 years ago

jacobweber commented 5 years ago

I know I can use {-|Fruit} to leave the {Fruit} custom slot unparsed.

But is there a way to combine that with the "Optional Words" syntax, {favorite |}, to render one version with the slot, and one without it?

For example, something like I like {-|Fruit|} ice cream which would return both I like {Fruit} ice cream and I like ice cream.