@coscine/app-util
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -170,3 +170,25 @@ var LanguageUtil = /** @class */ (function () { | ||
export { FileUtil, GuidUtil, LanguageUtil, LinkUtil }; | ||
var MergeUtil = /** @class */ (function () { | ||
function MergeUtil() { | ||
} | ||
MergeUtil.merge = function (obj1, obj2) { | ||
if (obj1 === undefined) { | ||
obj1 = {}; | ||
} | ||
for (var prop in obj2) { | ||
if (obj2.hasOwnProperty(prop)) { | ||
if (Object.prototype.toString.call(obj2[prop]) === '[object Object]') { | ||
obj1[prop] = this.merge(obj1[prop], obj2[prop]); | ||
} | ||
else { | ||
obj1[prop] = obj2[prop]; | ||
} | ||
} | ||
} | ||
return obj1; | ||
}; | ||
return MergeUtil; | ||
}()); | ||
export { FileUtil, GuidUtil, LanguageUtil, LinkUtil, MergeUtil }; | ||
//# sourceMappingURL=app-util.es5.js.map |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.appUtil = {})); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.appUtil = {})); | ||
}(this, (function (exports) { 'use strict'; | ||
@@ -176,2 +176,24 @@ | ||
var MergeUtil = /** @class */ (function () { | ||
function MergeUtil() { | ||
} | ||
MergeUtil.merge = function (obj1, obj2) { | ||
if (obj1 === undefined) { | ||
obj1 = {}; | ||
} | ||
for (var prop in obj2) { | ||
if (obj2.hasOwnProperty(prop)) { | ||
if (Object.prototype.toString.call(obj2[prop]) === '[object Object]') { | ||
obj1[prop] = this.merge(obj1[prop], obj2[prop]); | ||
} | ||
else { | ||
obj1[prop] = obj2[prop]; | ||
} | ||
} | ||
} | ||
return obj1; | ||
}; | ||
return MergeUtil; | ||
}()); | ||
exports.FileUtil = FileUtil; | ||
@@ -181,2 +203,3 @@ exports.GuidUtil = GuidUtil; | ||
exports.LinkUtil = LinkUtil; | ||
exports.MergeUtil = MergeUtil; | ||
@@ -183,0 +206,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var language_1 = require("./util/language"); | ||
exports.LanguageUtil = language_1.LanguageUtil; | ||
Object.defineProperty(exports, "LanguageUtil", { enumerable: true, get: function () { return language_1.LanguageUtil; } }); | ||
var guid_1 = require("./util/guid"); | ||
exports.GuidUtil = guid_1.GuidUtil; | ||
Object.defineProperty(exports, "GuidUtil", { enumerable: true, get: function () { return guid_1.GuidUtil; } }); | ||
var file_1 = require("./util/file"); | ||
exports.FileUtil = file_1.FileUtil; | ||
Object.defineProperty(exports, "FileUtil", { enumerable: true, get: function () { return file_1.FileUtil; } }); | ||
var link_1 = require("./util/link"); | ||
exports.LinkUtil = link_1.LinkUtil; | ||
Object.defineProperty(exports, "LinkUtil", { enumerable: true, get: function () { return link_1.LinkUtil; } }); | ||
var merge_1 = require("./util/merge"); | ||
Object.defineProperty(exports, "MergeUtil", { enumerable: true, get: function () { return merge_1.MergeUtil; } }); | ||
//# sourceMappingURL=app-util.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FileUtil = void 0; | ||
var FileUtil = /** @class */ (function () { | ||
@@ -4,0 +5,0 @@ function FileUtil() { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GuidUtil = void 0; | ||
var GuidUtil = /** @class */ (function () { | ||
@@ -4,0 +5,0 @@ function GuidUtil() { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LanguageUtil = void 0; | ||
var LanguageUtil = /** @class */ (function () { | ||
@@ -4,0 +5,0 @@ function LanguageUtil() { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LinkUtil = void 0; | ||
var LinkUtil = /** @class */ (function () { | ||
@@ -4,0 +5,0 @@ function LinkUtil() { |
@@ -5,1 +5,2 @@ export { LanguageUtil } from './util/language'; | ||
export { LinkUtil } from './util/link'; | ||
export { MergeUtil } from './util/merge'; |
{ | ||
"name": "@coscine/app-util", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "This library provides utility methods for the CoScInE Apps with JavaScript.", | ||
@@ -87,4 +87,4 @@ "keywords": [ | ||
"devDependencies": { | ||
"@commitlint/cli": "^8.3.5", | ||
"@commitlint/config-conventional": "^8.3.4", | ||
"@commitlint/cli": "^9.1.2", | ||
"@commitlint/config-conventional": "^9.1.1", | ||
"@semantic-release/commit-analyzer": "^8.0.1", | ||
@@ -95,38 +95,38 @@ "@semantic-release/git": "^9.0.0", | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
"@types/jest": "^25.2.1", | ||
"@types/node": "^13.13.2", | ||
"@types/jest": "^26.0.9", | ||
"@types/node": "^14.0.27", | ||
"colors": "^1.4.0", | ||
"commitizen": "^4.0.4", | ||
"conventional-changelog-eslint": "^3.0.4", | ||
"coveralls": "^3.0.14", | ||
"commitizen": "^4.1.2", | ||
"conventional-changelog-eslint": "^3.0.8", | ||
"coveralls": "^3.1.0", | ||
"cross-env": "^7.0.2", | ||
"cz-conventional-changelog": "^3.1.0", | ||
"eslint": "^6.8.0", | ||
"cz-conventional-changelog": "^3.2.0", | ||
"eslint": "^7.6.0", | ||
"eslint-config-google": "^0.14.0", | ||
"eslint-plugin-vue": "^6.2.2", | ||
"husky": "^4.2.5", | ||
"jest": "^25.4.0", | ||
"jest-config": "^25.4.0", | ||
"lint-staged": "^10.1.7", | ||
"jest": "^26.4.0", | ||
"jest-config": "^26.4.0", | ||
"lint-staged": "^10.2.11", | ||
"lodash.camelcase": "^4.3.0", | ||
"prettier": "^2.0.5", | ||
"prompt": "^1.0.0", | ||
"replace-in-file": "^5.0.2", | ||
"replace-in-file": "^6.1.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.7.2", | ||
"rollup": "^2.23.1", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-sourcemaps": "^0.5.0", | ||
"rollup-plugin-typescript2": "^0.27.0", | ||
"semantic-release": "^17.0.7", | ||
"rollup-plugin-sourcemaps": "^0.6.2", | ||
"rollup-plugin-typescript2": "^0.27.2", | ||
"semantic-release": "^17.1.1", | ||
"semantic-release-gitlab": "^8.0.1", | ||
"shelljs": "^0.8.3", | ||
"ts-jest": "^25.4.0", | ||
"ts-node": "^8.9.0", | ||
"tslint": "^6.1.1", | ||
"shelljs": "^0.8.4", | ||
"ts-jest": "^26.2.0", | ||
"ts-node": "^8.10.2", | ||
"tslint": "^6.1.3", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-config-standard": "^9.0.0", | ||
"typedoc": "^0.17.4", | ||
"typescript": "^3.8.3" | ||
"typedoc": "^0.18.0", | ||
"typescript": "^3.9.7" | ||
}, | ||
@@ -133,0 +133,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
70945
26
638