Matthew pfp
Matthew
@matthew
TIL you can just do .filter(Boolean) instead of .filter((prop) => !!prop)
6 replies
1 recast
20 reactions

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
It’s obsolete as of yesterday’s TypeScript candidate release, but I had an `isTruthy` helper function wrapping `Boolean()` that included proper type narrowing too.
1 reply
0 recast
1 reaction

Matthew pfp
Matthew
@matthew
of course it is lol
1 reply
0 recast
1 reaction