Socket
Socket
Sign inDemoInstall

check-os

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    check-os

> Check if the current operating system is what you need


Version published
Weekly downloads
14
increased by55.56%
Maintainers
1
Install size
8.19 kB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 29 Sep 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc