0.2.3 • Published 10 years ago

node-wos v0.2.3

Weekly downloads
3
License
GPL-2.0
Repository
github
Last release
10 years ago

node-wos

node-wos

Node What Operation System - Utility for operating system information.

What is this?

node-wos is a small wrapper to help you with the most commom operating system information.

Installation

npm i node-wos --save
# Global Installation
npm i -g node-wos

Example

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);

Documentation

NodeWOS.platform

Return the currrent platform.

return

  • String Platform can be windows, linux, mac, freeBSD, solaris

NodeWOS.arch

Return the current architecture.

return

  • String Architecture can be 64bit, 32bit, ARM.

NodeWOS.OS

Container to the NodeJS OS module available on require('os').

return

  • Object Equals to require('os')

NodeWOS.isWindows()

Verify if the current os is windows.

return

  • Boolean

NodeWOS.isLinux()

Verify if the current os is linux.

return

  • Boolean

NodeWOS.isMac()

Verify if the current os is mac.

return

  • Boolean

NodeWOS.isSolaris()

Verify if the current os is solaris.

return

  • Boolean

NodeWOS.isFreeBSD()

Verify if the current os is freeBSD.

return

  • Boolean

NodeWOS.getOSName([verbose])

Attemp to discover what the current operation system name. Ex: ubuntu, fedora, gentoo, Windows 10 Single Language...

params

  • boolean verbose : returns a non treated output for the os name command

return

  • String Operating system name or {platform} {arch}

Cli API

To see the all the cli options just execute

wos -help
# or
wos

Contributing

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

License

Copyright (c) 2015 Matheus Paiva (GPL-2.0) GNU GENERAL PUBLIC LICENSE

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago