Node What Operating System - Utility for operating system information.
node-wos
is a small wrapper to help you with the most commom operating system information.
npm i node-wos --save
# Global Installation
npm i -g node-wos
var wos = require('node-wos');
console.log(wos.isLinux()); // true
console.log(wos.platform); // linux
console.log(wos.arch); // 64bit
console.log(wos.getOSName()); // ubuntu
// Container to require('os')
console.log(wos.OS);
Return the currrent platform.
- String Platform can be
windows, linux, mac, freeBSD, solaris
Return the current architecture.
- String Architecture can be
64bit, 32bit, ARM
.
Container to the NodeJS OS module available on require('os')
.
- Object Equals to
require('os')
Verify if the current os is windows.
- Boolean
Verify if the current os is linux.
- Boolean
Verify if the current os is mac.
- Boolean
Verify if the current os is solaris.
- Boolean
Verify if the current os is freeBSD.
- Boolean
Attemp to discover what the current operating system name. Ex: ubuntu, fedora, gentoo, Windows 10 Single Language...
- boolean
verbose
: returns a non treated output for the os name command
- String Operating system name or
{platform} {arch}
To see the all the cli options just execute
wos -help
# or
wos
node-wos
is built using ecma script 6 and use babeljs to convert the code. To develop your changes just clone the project and execute the grunt task.
git clone https://github.com/mapaiva/node-wos.git
cd node-wos
npm install
npm run dev
#To build
npm run build
Copyright (c) 2015 Matheus Paiva (GPL-2.0) GNU GENERAL PUBLIC LICENSE