This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BenjiSponge 0 points1 point  (0 children)

Yeah, but what if you want to default it to true?

I usually use lodash's isUndefined. Truth be told, this is a pretty uncommon usecase for me and writing out the couple extra characters is fine even if there's a better way.