A

remove-iswhitespace

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

Removes isWhitespace calls and is-whitespace imports and replaces them with trim() calls.

is-whitespace is a small utility that checks if a string contains only whitespace characters.
It's not a very performant way to check for whitespace, especially when used in a loop.

Before

ts

After

ts

Ready to contribute?

Build your own codemod and share it with the community.