@E18e/Math.Sign

1.0.5Last update Aug 9, 2024
by@e18e

Math Sign Codemod

Introduction

This codemod replaces the usage of the math.sign/polyfill npm module with the built-in Math.sign method. By utilizing native JavaScript features, it reduces unnecessary dependencies and optimizes the codebase for better performance.

Before

import sign from 'math.sign/polyfill';
const value = sign(number);

After

const value = Math.sign(number);

Build custom codemods

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

background illustrationGet Started Now