ee-core 2.2.1 → 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 +1 -1
- package/package.json +1 -1
- package/services/index.js +9 -3
package/README.md
CHANGED
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
|
};
|