Registry
E

e18e/@e18e/concat-map

No description available

e18e38 executions

  • Legacy
  • e18e
  • module-replacement
Connect a repo
npx codemod @e18e/concat-map

concat-map Codemod

Introduction

This codemod replaces the use of the concat-map method with the built-in flatMap array method. This transformation helps to reduce dependencies on external utility libraries by utilizing native JavaScript functionality, thereby improving performance and reducing bundle size.

Before

javascript
const result = array.concatMap(item => transform(item));

After

javascript
const result = array.flatMap(item => transform(item));

Ready to evolve your codebase?

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