https://github.com/denorg/is-wsl
Check if the process is running inside a WSL enviroment in Deno
https://github.com/denorg/is-wsl
deno denoland denorg typescript wsl wsl2
Last synced: about 1 year ago
JSON representation
Check if the process is running inside a WSL enviroment in Deno
- Host: GitHub
- URL: https://github.com/denorg/is-wsl
- Owner: denorg
- License: mit
- Created: 2020-07-01T20:54:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-01T22:11:56.000Z (almost 6 years ago)
- Last Synced: 2025-04-11T16:05:14.047Z (about 1 year ago)
- Topics: deno, denoland, denorg, typescript, wsl, wsl2
- Language: TypeScript
- Homepage: https://denorg.github.io/is-wsl/
- Size: 9.77 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Is Wsl
Check if the process is running inside a WSL enviroment in Deno.
[](https://github.com/denorg/is-wsl/actions)
[](https://github.com/denorg/is-wsl/blob/master/LICENSE)
[](https://github.com/denorg/is-wsl/graphs/contributors)
[](https://denorg.github.io/starter/)
[](https://github.com/denorg)
[](https://github.com/denorg/is-wsl)
[](https://github.com/semantic-release/semantic-release)
## ⭐ Getting started
Import the `isWsl` function and use it:
```ts
import { isWsl } from "https://raw.githubusercontent.com/denorg/is-wsl/master/mod.ts";
const inWslEnviroment = await isWsl(); // boolean
```
### CLI with [DPX](https://github.com/denorg/dpx)
After [installing DPX](https://github.com/denorg/dpx), you can directly use the CLI using the `dpx` command:
```bash
dpx --allow-read starter
```
### CLI
Alternatively, you can use it directly from the CLI by using `deno run`:
```bash
deno run --allow-read https://raw.githubusercontent.com/denorg/is-wsl/master/cli.ts
```
You can also install it globally using the following:
```bash
deno install --allow-read -n starter https://raw.githubusercontent.com/denorg/is-wsl/master/cli.ts
```
Then, the package is available to run:
```bash
starter
```
### Configuration
Required permissions:
1. `--allow-read`
## 👩💻 Development
Run tests:
```bash
deno test --allow-read
```
## ⭐ Related Work
- [sindresorhus/is-wsl](https://github.com/sindresorhus/is-wsl) is the Node.js project serving as inspiration for this one
## 📄 License
MIT © [Denorg](https://den.org.in)
A project by Denorg, the world's first Deno-focused community
organization and consulting company. Work with us →