@E18e/Promise.Any

/icons/calendar.svg

Last update

Aug 9, 2024

promise.any Codemod

Introduction

This codemod replaces usage of the promise.any package with the built-in Promise.any method, which is part of the ECMAScript specification. By using the native implementation, this codemod helps to eliminate an unnecessary dependency, reducing the bundle size and enhancing performance.

Before

import promiseAny from 'promise.any';
const result = promiseAny([promise1, promise2]).then(value => {
console.log(value);
});

After

const result = Promise.any([promise1, promise2]).then(value => {
console.log(value);
});

Build custom codemods

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

background illustrationGet Started Now