kylestetz / Sentencer

:pencil2: madlibs-style sentence templating in Javascript
http://kylestetz.github.io/Sentencer
MIT License
378 stars 40 forks source link

Case sensitivity #20

Open madprops opened 4 years ago

madprops commented 4 years ago

Hi, this is a nice library. I'm using this now to replace my manual replacements with a word list I had.

What I'm missing though is something I had that allowed 'Noun' or 'noun', or 'NOUN'. Basically I just checked how the keyword was written, if it's capitalized or fully caps, then I would replace accordingly.

For instance {{ noun }} and {{ Noun }} could return 'radio' and 'Radio'.

Just an idea.