1.0.1 • Published 7 years ago

operatingsystem v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

operatingsystem.js

NPM Downloads

node implementation of oslib and goslib

Get specific operating system version, edition and other properties

Usage

$ npm install --save operatingsystem
const os = require("operatingsystem");

var info = os.current();

info.getDisplay().then((display) => {
    console.log(display); // Will print Windows 10 or macOS 10.12 Sierra etc...
});

if (info.type === os.OperatingSystemType.Windows) {
    console.log(info.getEdition()) // prints 10 on Windows 10
}