@E18e/Filter Array

1.0.5Last update Aug 9, 2024
by@e18e

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

background illustrationGet Started Now