@E18e/Abort Controller

1.0.5Last update Aug 9, 2024
by@e18e

Abort Controller Codemod

Introduction

This codemod removes the unnecessary import of the abort-controller npm module, ensuring that the codebase relies on built-in browser functionality where applicable. This helps to decrease bundle size and improve performance by eliminating unused dependencies.

Before

import AbortController from 'abort-controller';
const controller = new AbortController();
const signal = controller.signal;

After

const controller = new AbortController();
const signal = controller.signal;

Build custom codemods

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

background illustrationGet Started Now