Filter Array Codemod
Introduction
This codemod transforms instances of using a custom filterArray
function into the built-in Array.prototype.filter
method. This change reduces dependency on custom utility functions, leading to a more standardized, efficient codebase and decreased bundle size.
Before
const filteredItems = filterArray(items, item => item.isActive);
After
const filteredItems = items.filter(item => item.isActive);
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community