1 | # hadron-app-registry [![][npm_img]][npm_url]
|
2 |
|
3 | > Hadron App Registry
|
4 |
|
5 | ## Installation
|
6 |
|
7 | ```
|
8 | npm install --save hadron-app-registry
|
9 | ```
|
10 |
|
11 | ### Usage
|
12 |
|
13 | ```javascript
|
14 | const { AppRegistry } = require('hadron-app-registry');
|
15 |
|
16 | var registry = new AppRegistry();
|
17 |
|
18 | registry.registerAction('Action::MyAction', action);
|
19 | registry.registerComponent('Component::MyComponent', component);
|
20 | registry.registerStore('Store::MyStore', store);
|
21 |
|
22 | registry.actions; //=> { 'Action::MyAction': action }
|
23 | registry.components; //=> { 'Component::MyComponent': component }
|
24 | registry.stores; //=> { 'Store::MyStore':: store }
|
25 |
|
26 | registry.getAction('Action::MyAction'); //=> action
|
27 | registry.getComponent('Component::MyComponent'); //=> component
|
28 | registry.getStore('Store::MyStore'); //=> store
|
29 |
|
30 | registry.deregisterAction('Action::MyAction');
|
31 | registry.deregisterComponent('Component::MyComponent');
|
32 | registry.deregisterStore('Store::MyStore');
|
33 | ```
|
34 |
|
35 | [npm_img]: https://img.shields.io/npm/v/hadron-app-registry.svg?style=flat-square
|
36 | [npm_url]: https://www.npmjs.org/package/hadron-app-registry
|