添加 freem 命令
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const os = require('os');
|
||||
const fs = require("fs");
|
||||
const Windows = 0;
|
||||
const Linux = 1;
|
||||
const Windows = "Windows";
|
||||
const Linux = "Linux";
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -11,11 +11,11 @@ module.exports = {
|
||||
* 根据 os 不同,载入不同的方法
|
||||
*/
|
||||
choise : function ( cbs ) {
|
||||
if (os.type() == 'Windows_NT') {
|
||||
if (os.type() === 'Windows_NT') {
|
||||
// windows平台
|
||||
return cbs && cbs[ Windows ]
|
||||
}
|
||||
else if (os.type() == 'Linux') {
|
||||
else if (os.type() === 'Linux') {
|
||||
// Linux平台
|
||||
return cbs && cbs[ Linux ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user