NPM Smell 🍑💨

trivial and outdated NPM packages

is-windows trivial npm logo

Convoluted way to call process.platform === "win32"

Weekly Downloads
18,033,871
Dependencies
0
Latest Release
7 years ago
The provided functionality does not warrant its own package
Trivial

About

This dependency checks if the code is being run 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.