Mike Testa 2017-02-21 09:08:17 -07:00
parent 4821d96526
commit 989cb4d4ac
2 changed files with 6 additions and 2 deletions

4
dist/core/utils.js vendored
View File

@ -2,7 +2,9 @@ var Utils = (function () {
function Utils() {
}
Utils.isArgv = function (arg) {
return process.argv.indexOf("--" + arg) >= 0 ? true : false;
return Boolean(process.argv.find(function (item) {
return item.substr(0, 2) === '--' && item.indexOf(arg) > -1;
}));
};
Utils.merge = function (obj1, obj2) {
var obj3 = {};

View File

@ -1,7 +1,9 @@
class Utils{
static isArgv(arg) {
return process.argv.indexOf(`--${arg}`) >= 0 ? true : false;
return Boolean(process.argv.find(function(item) {
return item.substr(0, 2) === '--' && item.indexOf(arg) > -1;
}));
}
/**