The 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); // ==> trueconsole.log(currentOS.isOSX); // ==> falseconsole.log(currentOS.isLinux); // ==> false// if you are using OSX (Mac OS) : console.log(currentOS.isWindows); // ==> falseconsole.log(currentOS.isOSX); // ==> trueconsole.log(currentOS.isLinux); // ==> false// if you are using Linux : console.log(currentOS.isWindows); // ==> falseconsole.log(currentOS.isOSX); // ==> falseconsole.log(currentOS.isLinux); // ==> true
Contributors ✨
Thanks goes to these wonderful people (emoji key):