@E18e/Is Whitespace

/icons/calendar.svg

Last update

Aug 9, 2024

Remove is-whitespace Dependency Codemod

Introduction

This codemod removes the is-whitespace npm module from the codebase and replaces its usage with a built-in JavaScript feature. The goal is to reduce unnecessary dependencies, resulting in a smaller bundle size and improved performance.

Before

import isWhitespace from 'is-whitespace';
const isStringEmpty = (str) => isWhitespace(str);

After

const isStringEmpty = (str) => str.trim() === '';

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now