Build README

This commit is contained in:
Angelos Chalaris
2017-12-14 10:21:18 +02:00
parent 562cbdb26b
commit 9e63ad8975

View File

@ -754,9 +754,10 @@ const uuid = _ =>
Use `!isNaN` in combination with `parseFloat()` to check if the argument is a number.
Use `isFinite()` to check if the number is finite.
Use `Number()` to check if the coercion holds.
```js
const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n);
const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n) && Number(n) == n;
// validateNumber('10') -> true
```