check-os
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

check-os

Check if the current operating system is what you need

Usage

Install

const os = require('check-os')

In code

if(os.isWindows) {...} //Check if current os is Windows
if(os.isMacOS) {...} //Check if current os is MacOS
if(os.isLinux) {...} //Check if current os is Linux
if(os.isSunOs) {...} //Check if current os is SunOS
if(os.FreeBSD) {...} //Check if current os is FreeBSD

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    8
  • 1.0.0
    1

Package Sidebar

Install

npm i check-os

Weekly Downloads

8

Version

1.0.1

License

MIT

Unpacked Size

7.4 kB

Total Files

7

Last publish

Collaborators

  • marvinjwendt