Linting
This commit is contained in:
@ -5,6 +5,6 @@ Returns the first non-null/undefined argument.
|
||||
Use `Array.find()` to return the first non `null`/`undefined` argument.
|
||||
|
||||
```js
|
||||
const coalesce = (...args) => args.find(_ => ![undefined, null].includes(_))
|
||||
const coalesce = (...args) => args.find(_ => ![undefined, null].includes(_));
|
||||
// coalesce(null,undefined,"",NaN, "Waldo") -> ""
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user