1.1.1 • Published 2 years ago
@putout/plugin-apply-filter-boolean v1.1.1
@putout/plugin-apply-filter-boolean
putout
plugin adds ability to apply filter(Boolean)
. Better use @putout/plugin-remove-useless-functions.
Install
npm i @putout/plugin-apply-filter-boolean
Rule
{
"rules": {
"apply-filter-boolean": "on"
}
}
❌ Incorrect code example
array.filter((a) => a);
✅ Correct code Example
array.filter(Boolean);
License
MIT