NPM Smell 🍑💨

trivial and outdated NPM packages

is-windows trivial npm logo

A convoluted way of checking process.platform === "win32"

Weekly Downloads
13,272,004
Dependencies
0
Latest Release
8 years ago
Better as a utility function
Trivial

About

This dependency checks if the code is running on Windows.

Node.js provides the process.platform property which returns the platform on which the Node.js process is running.

Code

process.platform === "win32"; // true

// as a function
function isWindows() {
    return process.platform === "win32";
}

that’s all the dependency does.

Check process.platform for more information and for more platform values.