Registry
E

e18e/@e18e/is-number-object

No description available

e18e35 executions

  • Legacy
  • e18e
  • module-replacement
Connect a repo
npx codemod @e18e/is-number-object

is-number-object Codemod

Introduction

This codemod replaces the usage of the is-number-object npm module with a built-in JavaScript approach. It transforms the code to use Object.prototype.toString.call for checking if a value is a number, removing the dependency and enhancing performance by leveraging native capabilities.

Before

javascript
import isNumber from 'is-number-object';

const result = isNumber(value);

After

javascript
const result = Object.prototype.toString.call(value) === '[object Number]';

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.