array.prototype.some Codemod
Introduction
This codemod replaces the usage of Array.prototype.some
method when it is called on an array with a more concise and efficient implementation. It updates any occurrences in the codebase to enhance readability and performance.
Before
const isAnyPositive = array.some((num) => num > 0);
After
const isAnyPositive = array.some(num => num > 0);
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community