@E18e/String.Prototype.Split

/icons/calendar.svg

Last update

Aug 9, 2024

String.prototype.split Codemod

Introduction

This codemod replaces the use of the split method from external libraries with the built-in String.prototype.split method. This improves performance by reducing unnecessary dependencies, thereby minimizing the bundle size and enhancing the overall efficiency of the codebase.

Before

import split from 'some-string-split-library';
const result = split('apple,banana,cherry', ',');

After

const result = 'apple,banana,cherry'.split(',');

Build custom codemods

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

background illustrationGet Started Now