Remove valueOrDefault

This commit is contained in:
Angelos Chalaris
2017-12-16 18:01:59 +02:00
parent ba8c1ccbc4
commit 8f5aa15b3f
3 changed files with 0 additions and 21 deletions

View File

@ -128,7 +128,6 @@
* [UUID generator](#uuid-generator) * [UUID generator](#uuid-generator)
* [Validate email](#validate-email) * [Validate email](#validate-email)
* [Validate number](#validate-number) * [Validate number](#validate-number)
* [Value or default](#value-or-default)
## Array ## Array
@ -1480,17 +1479,6 @@ const validateNumber = n => !isNaN(parseFloat(n)) && isFinite(n) && Number(n) ==
[⬆ back to top](#table-of-contents) [⬆ 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 ## 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/).* *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/).*

View File

@ -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
```

View File

@ -97,5 +97,4 @@ URL-parameters:utility
UUID-generator:utility UUID-generator:utility
validate-email:utility validate-email:utility
validate-number:utility validate-number:utility
value-or-default:utility
write-JSON-to-file:node write-JSON-to-file:node