is-wsl
npmv3.1.1TypeScriptCheck if the process is running inside Windows Subsystem for Linux (Bash on Windows)
Safe to adopt
Yes — is-wsl scores well across adoption, maintenance, weight, supply chain, and licensing. 117.6M downloads per week and 4 known dependents. Last published 206 days ago.
- AAdoption: grade A, Excellent.
117.6M downloads per week and 4 known dependents.
- BMaintenance: grade B, Good.
Last published 206 days ago.
- AWeight: grade A, Excellent.
Pulls in 2 transitive packages, about 10 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding is-wsl to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing is-wsl, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=16
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the is-wsl README.
import isWsl from 'is-wsl';
// When running inside Windows Subsystem for Linux
console.log(isWsl);
//=> trueis-wsl vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| is-wslthis page | 117.6M | 4 | MIT | 6 months ago |
| wsl-utils | 42.8M | 1 | MIT | 1 day ago |
| supports-hyperlinks | 35.4M | 1 | MIT | 1 day ago |
| has-flag | 166.9M | 1 | MIT | 1 day ago |
| is-glob | 137.4M | 3 | MIT | 1 day ago |
| is-inside-container | 0 | 2 | MIT | 1 day ago |
Dependencies
Declared by is-wsl v3.1.1. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (4)
Used by
Popular packages that depend on is-wsl.
Utilities for working with Windows Subsystem for Linux (WSL)
A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)
Launch latest Chrome with the Devtools Protocol port open
Launch latest Edge with the Devtools Protocol port open
Relationship graph
Dependencies (left) and dependents (right) of is-wsl.
Frequently installed together
Escape RegExp special characters
TypeScript execution environment and REPL for node.js, with source map support
A shared logging utility class for lighthouse and friends.
TypeScript definitions for node
Like which(1) unix command. Find the first instance of an executable in the PATH.
RFC9562 UUIDs
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Delightful JavaScript Testing.
The semantic version parser used by npm.
Simple zero-dependency Growl notifications using GNTP.
Release history
1 release in the last two years, typically about 223 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.1.1latest | 6 months ago | 3.6 KB | MIT |
| 3.1.0 | 3 years ago | 3.4 KB | MIT |
| 3.0.0 | 3 years ago | 3.3 KB | MIT |
| 2.2.0 | 6 years ago | 3.7 KB | MIT |
| 2.1.1 | 7 years ago | 3.5 KB | MIT |
| 2.1.0 | 7 years ago | 3.5 KB | MIT |
| 2.0.0 | 7 years ago | 3.1 KB | MIT |
| 1.1.0 | 9 years ago | — | MIT |
| 1.0.0 | 9 years ago | — | MIT |
Overview
is-wsl is an npm package that check if the process is running inside Windows Subsystem for Linux (Bash on Windows). It is extremely widely used, with about 117.6M downloads per week and 4 known dependents in the graph. The latest version is 3.1.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need check if the process is running inside Windows Subsystem for Linux (Bash on Windows) and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (117.6M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use is-wsl?
Yes — is-wsl scores well across adoption, maintenance, weight, supply chain, and licensing. 117.6M downloads per week and 4 known dependents. Last published 206 days ago.
How do I install is-wsl?
Run `npm install is-wsl` to add is-wsl to your npm project.
How many dependencies does is-wsl have?
is-wsl declares 5 direct dependencies and pulls in 2 packages in total once its runtime tree is resolved totalling about 10 KB on disk.
What license is is-wsl released under?
is-wsl is distributed under the MIT license.
How popular is is-wsl?
is-wsl has approximately 117,588,171 downloads per week and 4 known dependent packages.
Is is-wsl still maintained?
The most recent release of is-wsl (v3.1.1) was published 6 months ago.
Does is-wsl run install scripts?
No. is-wsl does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.