Closed oamaok closed 6 years ago
thanks!
the falsey checks always get me in js since I don't write it that often (^:
Good point.
yes, I will consider changing to isNaN, but this PR is perfectly fine as it went more closely with what the code was originally doing.
btw this is now live on the npm package :ok_hand:
Also, I fucked up: the undefined check doesn't even work, since it's not comparing it to the string "undefined"
, but to the actual undefined
. This PR actually broke all the checks :D
lolol I thought it was some alternative way to do it but I guess not
anyways I'm changing some of them to isNaN (the required params ones) and leaving others with isUndefined so that it doesn't silently replace wrong types with default values
Should fix #3