manman89

NODE.JS - isWindows FUNCTION

May 16th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. var isWindows = process.platform.substr(0,3).toUpperCase() == "WIN" ? true : false;
  2. if(isWindows != true){
  3. console.log("PLEASE RUN THIS SCRIPT ON WINDOWS OPERATING SYSTEM");
  4. process.exit();
  5. }
Advertisement
Add Comment
Please, Sign In to add comment