Merge pull request #2 from Mikt25/master

Fix for https://github.com/radswiat/webpack-auto-inject-version/issues/1
This commit is contained in:
Radek 2017-03-21 11:37:52 +00:00 committed by GitHub
commit bfcd03cff9
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;
}));
}
/**