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 CHANGED
@@ -1,7 +1,10 @@
1
1
  ### introduction
2
2
 
3
- You can use ee core as a **module**, see more: [introduction](https://www.kaka996.com/pages/1dbe35/)
4
- [中文文档](https://www.kaka996.com/pages/1dbe35/)
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ee-core",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "ee core",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/services/index.js CHANGED
@@ -23,11 +23,17 @@ const Services = {
23
23
  */
24
24
  get(name) {
25
25
  const instances = this.all();
26
- const instance = instances[name] || null;
27
- if (!instance) {
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 instance;
36
+ return obj;
31
37
  },
32
38
 
33
39
  };