ee-core 2.2.0 → 2.2.2
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/README.md +5 -2
- package/package.json +1 -1
- package/services/index.js +9 -3
package/README.md
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
### introduction
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Powerful electron third party module, offering **100+ API**
|
|
4
|
+
|
|
5
|
+
[introduction](https://www.kaka996.com/pages/85c531/)
|
|
6
|
+
|
|
7
|
+
[中文文档](https://www.kaka996.com/pages/85c531/)
|
|
5
8
|
|
|
6
9
|
### module list
|
|
7
10
|
|
package/package.json
CHANGED
package/services/index.js
CHANGED
|
@@ -23,11 +23,17 @@ const Services = {
|
|
|
23
23
|
*/
|
|
24
24
|
get(name) {
|
|
25
25
|
const instances = this.all();
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
|
|
27
|
+
const actions = name.split('.');
|
|
28
|
+
let obj = instances;
|
|
29
|
+
actions.forEach(key => {
|
|
30
|
+
obj = obj[key];
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (!obj) {
|
|
28
34
|
throw new Error(`Service class '${name}' not exists or do not call directly at the top!`);
|
|
29
35
|
};
|
|
30
|
-
return
|
|
36
|
+
return obj;
|
|
31
37
|
},
|
|
32
38
|
|
|
33
39
|
};
|