spumko/joi — pull request #139 by iamdoron (2013-11-11 15:26:10+00:00)
Title: empty string is not a number

[I think] `""` shouldn't be allowed to be validated as a number.

there were 2 main things I had to overcome/understand
* In JavaScript, empty string is treated as false (`"" == false`), that's why an empty string wasn't treated at all by the code.
* I was thinking of using `parseFloat`, but I saw that `parseFloat("1 some text").is.equal(1)`. `Number` is much more safer in that sense, with one exception (that I'm aware of): `Number("").is.equal(0)`.