@E18e/String.Prototype.Replaceall

/icons/calendar.svg

Last update

Aug 9, 2024

String.prototype.replaceAll Codemod

Introduction

This codemod transforms instances of string.prototype.replaceall to the built-in method replaceAll. This replacement helps in removing unnecessary dependencies on external libraries for string manipulation, thereby reducing the bundle size and improving code performance.

Before

const updatedString = myString.replaceall('foo', 'bar');

After

const updatedString = myString.replaceAll('foo', 'bar');

Build custom codemods

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

background illustrationGet Started Now