Changing instances of the word falsey to falsy for consistency sake, and especially as there is the array FilterFalsy function that is spelled without an e.
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
### compact
|
||||
|
||||
Removes falsey values from an array.
|
||||
Removes falsy values from an array.
|
||||
|
||||
Use `Array.prototype.filter()` to filter out falsey values (`false`, `null`, `0`, `""`, `undefined`, and `NaN`).
|
||||
Use `Array.prototype.filter()` to filter out falsy values (`false`, `null`, `0`, `""`, `undefined`, and `NaN`).
|
||||
|
||||
```js
|
||||
const compact = arr => arr.filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user