@E18e/Array.Prototype.Tospliced

1.0.5Last update Aug 9, 2024
by@e18e

Array.prototype.tospliced Codemod

Introduction

This codemod updates instances of the deprecated Array.prototype.tospliced method to the more standard Array.prototype.toSpliced method. This transformation aims to standardize the usage of array methods in your codebase, improve readability, and reduce potential confusion caused by using non-standard methods.

Before

const array = [1, 2, 3, 4];
const newArray = array.tospliced(1, 2, 5);

After

const array = [1, 2, 3, 4];
const newArray = array.toSpliced(1, 2, 5);

Build custom codemods

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

background illustrationGet Started Now