@E18e/Array.Prototype.Push

1.0.5Last update Aug 9, 2024
by@e18e

Array.prototype.push Codemod

Introduction

This codemod replaces the usage of array.push with a more efficient implementation that avoids unnecessary overhead in the codebase. By optimizing the way arrays are manipulated, this transformation helps reduce bundle size and improve performance.

Before

const array = [];
array.push(item);

After

const array = [item];

Build custom codemods

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

background illustrationGet Started Now