1 | // Generated by CoffeeScript 1.9.3
|
2 | (function() {
|
3 | var getPlatformName, platform;
|
4 |
|
5 | platform = require('platform');
|
6 |
|
7 | getPlatformName = function() {
|
8 | var os;
|
9 | os = platform.os.family;
|
10 | os = os.toLowerCase().replace(/ /g, '');
|
11 | if (/\bwin/.test(os)) {
|
12 | os = 'windows';
|
13 | } else if (/darwin/.test(os)) {
|
14 | os = 'osx';
|
15 | } else if (/freebsd|sunos/.test(os)) {
|
16 | os = 'linux';
|
17 | }
|
18 | return os;
|
19 | };
|
20 |
|
21 | module.exports = {
|
22 | getPlatformName: getPlatformName
|
23 | };
|
24 |
|
25 | }).call(this);
|