number.isnan Codemod
Introduction
This codemod replaces usages of the number.isnan
function from the number
library with the built-in Number.isNaN
method. This transformation eliminates the dependency on the number
library, reducing bundle size and improving the performance of the codebase.
Before
import { isNaN } from 'number';const result = isNaN(value);
After
const result = Number.isNaN(value);
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community