Registry
E

e18e/@e18e/is-windows

No description available

e18e41 executions

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

is-windows Codemod

Introduction

This codemod removes the dependency on the is-windows npm package by replacing its usage with a built-in Node.js feature. It converts calls to is-windows() into a direct comparison of process.platform with 'win32', reducing unnecessary dependencies and improving performance.

Before

javascript
import isWindows from 'is-windows';

if (isWindows()) {
    console.log('Running on Windows');
}

After

javascript
if (process.platform === 'win32') {
    console.log('Running on Windows');
}

Ready to evolve your codebase?

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