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

Readme

Keywords

none

Package Sidebar

Install

npm i check-os

Weekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

7.4 kB

Total Files

7

Last publish

Collaborators

  • marvinjwendt