</>PackageGraphPackageGraph

is-wsl

npmv3.1.1TypeScript

Check 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.

1
Direct dependencies

Runtime packages this one declares itself.

2
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

10 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

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);
//=> true

is-wsl vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
is-wslthis page117.6M4MIT6 months ago
wsl-utils42.8M1MIT1 day ago
supports-hyperlinks35.4M1MIT1 day ago
has-flag166.9M1MIT1 day ago
is-glob137.4M3MIT1 day ago
is-inside-container02MIT1 day ago

Dependencies

Declared by is-wsl v3.1.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (4)

ava ^5.3.1esmock ^2.3.6tsd ^0.28.1xo ^0.55.1

Used by

Popular packages that depend on is-wsl.

Relationship graph

Dependencies (left) and dependents (right) of is-wsl.

Frequently installed together

Release history

1 release in the last two years, typically about 223 days apart.

Recent versions of is-wsl
VersionPublishedSizeLicense
3.1.1latest6 months ago3.6 KBMIT
3.1.03 years ago3.4 KBMIT
3.0.03 years ago3.3 KBMIT
2.2.06 years ago3.7 KBMIT
2.1.17 years ago3.5 KBMIT
2.1.07 years ago3.5 KBMIT
2.0.07 years ago3.1 KBMIT
1.1.09 years agoMIT
1.0.09 years agoMIT

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

Keywords

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.