Remove valueOrDefault
This commit is contained in:
12
README.md
12
README.md
@ -128,7 +128,6 @@
|
||||
* [UUID generator](#uuid-generator)
|
||||
* [Validate email](#validate-email)
|
||||
* [Validate number](#validate-number)
|
||||
* [Value or default](#value-or-default)
|
||||
|
||||
## Array
|
||||
|
||||
@ -1480,17 +1479,6 @@ const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n) && Number(n) ==
|
||||
|
||||
[⬆ back to top](#table-of-contents)
|
||||
|
||||
### Value or default
|
||||
|
||||
Returns value, or default value if passed value is `falsy`.
|
||||
|
||||
```js
|
||||
const valueOrDefault = (value, d) => value || d;
|
||||
// valueOrDefault(NaN, 30) -> 30
|
||||
```
|
||||
|
||||
[⬆ back to top](#table-of-contents)
|
||||
|
||||
## 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/).*
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
### Value or default
|
||||
|
||||
Returns value, or default value if passed value is `falsy`.
|
||||
|
||||
```js
|
||||
const valueOrDefault = (value, d) => value || d;
|
||||
// valueOrDefault(NaN, 30) -> 30
|
||||
```
|
||||
@ -97,5 +97,4 @@ URL-parameters:utility
|
||||
UUID-generator:utility
|
||||
validate-email:utility
|
||||
validate-number:utility
|
||||
value-or-default:utility
|
||||
write-JSON-to-file:node
|
||||
|
||||
Reference in New Issue
Block a user