os.js
v0.2.1
Published
Very stupid detection of OS
Maintainers
Readme
Readme
Very stupid detection of OS version and Name for node(io).js More usable for Atom's Electron.
Warning!
This package under development! Now detect only Mac OS X
Usage
Install in your project:
npm install os.js --saveAnd simple use:
var osjs = require('os.js');
console.log(osjs.os, osjs.version.major + '.' + osjs.version.minor, osjs.version.codename);
// Output:
// OS X 10.10 YosemiteAnd for some user's cli:
$ os.js
OS X 10.10 YosemiteTesting
Tests use Mocha and Should
git clone --recursive https://github.com/LestaD/os.js.git
cd os.js
npm install
npm testTested on OS X 10.10, Ubuntu 15 with iojs-v2.5.0, iojs-v3.0.0, iojs-v3.2.0
Need testing on Windows 7, 8, 8.1, 10.
Not detect right version of some Linuxes
