How can I check if a variable\'s type is of type Boolean?
I mean, there are some alternatives such as:
if(jQuery.type(new Boolean()) === jQuery.type(
Creating functions like isBoolean which contains oneliner typeof v === "boolean" seems very unhandy in long term. i am suprised that almost everyone suggest to create your own function. It seems to be same cancer as extending native prototypes.
just memoize typeof v === "boolean" and that's all.
Add a template to your IDE to be able to put it by some three letter shortcut and be happy.