Registry
E

e18e/@e18e/is-regexp

No description available

e18e34 executions

  • Legacy
  • e18e
  • module-replacement
Connect a repo
npx codemod @e18e/is-regexp

is-regexp Codemod

Introduction

This codemod removes the dependency on the is-regexp package by replacing its function calls with a native JavaScript expression that checks if a value is an instance of RegExp. This change ultimately reduces the bundle size and improves the performance of the codebase by eliminating unnecessary imports.

Before

javascript
import isRegexp from 'is-regexp';

const result = isRegexp(value);

After

javascript
const result = (value instanceof RegExp);

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.