package
Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)
npm install is-wslGitHub-flavored package documentation.
Across all versions, last 30 days.
772,049,730 in 30 days
Runtime metadata.
Tagged topics.
Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)
Can be useful if you need to work around unimplemented or buggy features in WSL. Supports both WSL 1 and WSL 2.
npm install is-wslimport isWsl from 'is-wsl';
// When running inside Windows Subsystem for Linux
console.log(isWsl);
//=> trueEstimated unpacked size across 3 packages.
10.4 kB
Includes dependencies.