The # of times I actually wanted to print "null" or "undefined" in javascript template strings: 0
Just wrote an npm package that solves this problem!https://www.npmjs.com/package/required-template …
-
-
-
If you prefer to replace "null" and "undefined" with empty strings check out https://www.npmjs.com/package/template-clean … For my use case (customer facing copy), I prefer to throw so issues are caught during testing. The ideal package throws during test/dev and passes empty strings in prod
Show this thread
End of conversation
New conversation -
-
-
the repo link 404s
-
Doh. Fixed!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.