File tree 4 files changed +47
-0
lines changed
4 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
Original file line number Diff line number Diff line change
1
+
2
+ # Bus
3
+
4
+ Application-wide event bus component (a Singleton ` Emitter ` ).
5
+
6
+ ## Installation
7
+
8
+ ```
9
+ $ npm install bus-component
10
+ ```
11
+
12
+ ## API
13
+
14
+ ``` js
15
+ var bus = require (' bus' );
16
+ bus .emit (' stuff' );
17
+ ```
Original file line number Diff line number Diff line change
1
+
2
+ /**
3
+ * Module dependencies.
4
+ */
5
+
6
+ var Emitter = require ( 'emitter' ) ;
7
+
8
+ /**
9
+ * Expose the event bus.
10
+ */
11
+
12
+ module . exports = new Emitter ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " bus-component" ,
3
+ "description" : " Application-wide event bus" ,
4
+ "version" : " 0.0.1" ,
5
+ "dependencies" : {
6
+ "emitter-component" : " *"
7
+ },
8
+ "devDependencies" : {
9
+ "mocha" : " *" ,
10
+ "should" : " *"
11
+ },
12
+ "component" : {
13
+ "scripts" : {
14
+ "bus" : " index.js"
15
+ }
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments