6b11b047b69af1116cdc8c7416a1601f7402d3acda0d1bbbde0aa3dec9b8a3e7e9e626c78a8e7787d83316de4dc12ccd9b73053f7beb7a485de0d521975b•3.69 kB
{"_id":"wsl-utils","name":"wsl-utils","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"wsl-utils","version":"0.1.0","description":"Utilities for working with Windows Subsystem for Linux (WSL)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/wsl-utils.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts --skipLibCheck"},"keywords":["wsl","windows","subsystem","linux","powershell","mount","utilities"],"dependencies":{"is-wsl":"^3.1.0"},"devDependencies":{"ava":"^6.3.0","typescript":"^5.8.3","xo":"^1.0.0"},"_id":"wsl-utils@0.1.0","gitHead":"04a87271eb4e2383c1bcd2f20146693d40bdd4bb","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/wsl-utils/issues"},"homepage":"https://github.com/sindresorhus/wsl-utils#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==","shasum":"8783d4df671d4d50365be2ee4c71917a0557baab","tarball":"https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz","fileCount":5,"unpackedSize":5036,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFCrvz7Qyr97it2moj4jJqf8ZIC+/50q3noOmH0yJKQNAiAF1EsjOEyHWaGapbdlN6O8locbrA0qK6EdJ7HtJ3hCHg=="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wsl-utils_0.1.0_1748044032698_0.9980935081165065"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-23T23:47:12.697Z","0.1.0":"2025-05-23T23:47:12.897Z","modified":"2025-05-23T23:47:13.181Z"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"description":"Utilities for working with Windows Subsystem for Linux (WSL)","homepage":"https://github.com/sindresorhus/wsl-utils#readme","keywords":["wsl","windows","subsystem","linux","powershell","mount","utilities"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/wsl-utils.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/wsl-utils/issues"},"license":"MIT","readme":"# wsl-utils\n\n> Utilities for working with [Windows Subsystem for Linux (WSL)](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)\n\n## Install\n\n```sh\nnpm install wsl-utils\n```\n\n## Usage\n\n```js\nimport {isWsl, powerShellPathFromWsl} from 'wsl-utils';\n\n// Check if running in WSL\nconsole.log('Is WSL:', isWsl);\n\n// Get PowerShell path from WSL\nconsole.log('PowerShell path:', await powerShellPathFromWsl());\n//=> '/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe'\n```\n\n## API\n\n### isWsl\n\nType: `boolean`\n\nCheck if the current environment is Windows Subsystem for Linux (WSL).\n\n### powerShellPathFromWsl()\n\nReturns: `Promise<string>`\n\nGet the PowerShell executable path in WSL environment.\n\n### powerShellPath()\n\nReturns: `Promise<string>`\n\nGet the PowerShell executable path for the current environment.\n\nReturns WSL path if in WSL, otherwise returns Windows path.\n\n### wslDrivesMountPoint()\n\nReturns: `Promise<string>`\n\nGet the mount point for fixed drives in WSL.\n","readmeFilename":"readme.md","_rev":"1-3cce3b73d6625c92aa1a79092c3499bd"}