Utils file fix

This commit is contained in:
radswiat 2016-10-20 10:12:15 +01:00
parent acddeedd1a
commit 4a3bd0795c
2 changed files with 6 additions and 3 deletions

3
dist/core/utils.js vendored
View File

@ -4,7 +4,7 @@ var Utils = (function () {
Utils.isArgv = function (arg) {
return process.argv.indexOf("--" + arg) >= 0 ? true : false;
};
Utils.merge_options = function (obj1, obj2) {
Utils.merge = function (obj1, obj2) {
var obj3 = {};
for (var attrname in obj1) {
obj3[attrname] = obj1[attrname];
@ -16,3 +16,4 @@ var Utils = (function () {
};
return Utils;
}());
module.exports = Utils;

View File

@ -10,11 +10,13 @@ class Utils{
* @param obj2
* @returns obj3 a new object based on obj1 and obj2
*/
static merge_options(obj1,obj2){
static merge(obj1,obj2){
var obj3 = {};
for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }
for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }
return obj3;
}
}
}
module.exports = Utils;