Build README
This commit is contained in:
10
README.md
10
README.md
@ -57,6 +57,7 @@
|
||||
* [URL parameters](#url-parameters)
|
||||
* [UUID generator](#uuid-generator)
|
||||
* [Validate number](#validate-number)
|
||||
* [Value or default](#value-or-default)
|
||||
|
||||
### Anagrams of string (with duplicates)
|
||||
|
||||
@ -561,6 +562,15 @@ const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n);
|
||||
// validateNumber('10') -> true
|
||||
```
|
||||
|
||||
### Value or default
|
||||
|
||||
Returns value, or default value if passed value is `falsy`.
|
||||
|
||||
```js
|
||||
const valueOrDefault = (value, d) => value || d;
|
||||
// valueOrDefault(NaN, 30) -> 30
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
||||
*Icons made by [Smashicons](https://www.flaticon.com/authors/smashicons) from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/).*
|
||||
|
||||
Reference in New Issue
Block a user