mm_expand 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base.js +5 -2
- package/package.json +1 -1
package/lib/base.js
CHANGED
|
@@ -13,7 +13,7 @@ class Base extends Event {
|
|
|
13
13
|
* @param {object} config 配置参数
|
|
14
14
|
*/
|
|
15
15
|
constructor(config) {
|
|
16
|
-
super(
|
|
16
|
+
super();
|
|
17
17
|
/**
|
|
18
18
|
* 状态
|
|
19
19
|
* @type {string} - 状态, 可选值: creating, created, initing, inited, loading, loaded, starting, running, stopping, stopped, unloading, unloaded, destroying, destroyed
|
|
@@ -73,7 +73,10 @@ Base.prototype._initListen = function () {
|
|
|
73
73
|
*/
|
|
74
74
|
Base.prototype.setConfig = function (config) {
|
|
75
75
|
if (config) {
|
|
76
|
-
|
|
76
|
+
if (typeof config !== 'object') {
|
|
77
|
+
throw new TypeError('配置参数必须是对象');
|
|
78
|
+
}
|
|
79
|
+
Object.assign(...this.constructor.config, this.config, config);
|
|
77
80
|
}
|
|
78
81
|
return this.config;
|
|
79
82
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_expand",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Super Meimei Prototype Function Extension Module - Enhanced operations for string, array, object, date manipulation with error prevention and simplified business logic.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|