@E18e/String.Prototype.Padend

1.0.5Last update Aug 9, 2024
by@e18e

String.prototype.padend to padEnd Codemod

Introduction

This codemod replaces the usage of the non-standard String.prototype.padend method with the standard String.prototype.padEnd method. This change helps to ensure compatibility with more environments and improves maintainability by using built-in JavaScript functionality.

Before

const str = 'Hello';
const padded = str.padend(10, '!');

After

const str = 'Hello';
const padded = str.padEnd(10, '!');

Build custom codemods

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

background illustrationGet Started Now