package
Check the type of current OS 🧐 ..
npm install current-osGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
5.8 kB
Includes dependencies.
# npm ..
$ npm install current-os
# yarn ..
$ yarn add current-osThe method of use is simple and very easy .. Just follow these steps :
var currentOS = require ('current-os');
// if you are using Windows OS :
console.log(currentOS.isWindows); // ==> true
console.log(currentOS.isOSX); // ==> false
console.log(currentOS.isLinux); // ==> false
// if you are using OSX (Mac OS) :
console.log(currentOS.isWindows); // ==> false
console.log(currentOS.isOSX); // ==> true
console.log(currentOS.isLinux); // ==> false
// if you are using Linux :
console.log(currentOS.isWindows); // ==> false
console.log(currentOS.isOSX); // ==> false
console.log(currentOS.isLinux); // ==> true
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!