Utils file fix
This commit is contained in:
parent
acddeedd1a
commit
4a3bd0795c
2 changed files with 6 additions and 3 deletions
3
dist/core/utils.js
vendored
3
dist/core/utils.js
vendored
|
@ -4,7 +4,7 @@ var Utils = (function () {
|
||||||
Utils.isArgv = function (arg) {
|
Utils.isArgv = function (arg) {
|
||||||
return process.argv.indexOf("--" + arg) >= 0 ? true : false;
|
return process.argv.indexOf("--" + arg) >= 0 ? true : false;
|
||||||
};
|
};
|
||||||
Utils.merge_options = function (obj1, obj2) {
|
Utils.merge = function (obj1, obj2) {
|
||||||
var obj3 = {};
|
var obj3 = {};
|
||||||
for (var attrname in obj1) {
|
for (var attrname in obj1) {
|
||||||
obj3[attrname] = obj1[attrname];
|
obj3[attrname] = obj1[attrname];
|
||||||
|
@ -16,3 +16,4 @@ var Utils = (function () {
|
||||||
};
|
};
|
||||||
return Utils;
|
return Utils;
|
||||||
}());
|
}());
|
||||||
|
module.exports = Utils;
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Utils{
|
||||||
* @param obj2
|
* @param obj2
|
||||||
* @returns obj3 a new object based on obj1 and obj2
|
* @returns obj3 a new object based on obj1 and obj2
|
||||||
*/
|
*/
|
||||||
static merge_options(obj1,obj2){
|
static merge(obj1,obj2){
|
||||||
var obj3 = {};
|
var obj3 = {};
|
||||||
for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }
|
for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }
|
||||||
for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }
|
for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }
|
||||||
|
@ -18,3 +18,5 @@ class Utils{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module.exports = Utils;
|
Loading…
Reference in a new issue