2016-10-20 20:09:44 +11:00
|
|
|
var Utils = (function () {
|
|
|
|
function Utils() {
|
|
|
|
}
|
|
|
|
Utils.isArgv = function (arg) {
|
|
|
|
return process.argv.indexOf("--" + arg) >= 0 ? true : false;
|
|
|
|
};
|
2016-10-20 20:12:15 +11:00
|
|
|
Utils.merge = function (obj1, obj2) {
|
2016-10-20 20:09:44 +11:00
|
|
|
var obj3 = {};
|
|
|
|
for (var attrname in obj1) {
|
|
|
|
obj3[attrname] = obj1[attrname];
|
|
|
|
}
|
|
|
|
for (var attrname in obj2) {
|
|
|
|
obj3[attrname] = obj2[attrname];
|
|
|
|
}
|
|
|
|
return obj3;
|
|
|
|
};
|
|
|
|
return Utils;
|
|
|
|
}());
|
2016-10-20 20:12:15 +11:00
|
|
|
module.exports = Utils;
|