mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-04-05 07:31:08 +00:00
17 lines
No EOL
519 B
JavaScript
17 lines
No EOL
519 B
JavaScript
module.exports = function( target, searchChannel, statsChannel ) {
|
|
target.bus = {
|
|
subscriptions: [],
|
|
publishers: [
|
|
target.on( "newTweets", function( data ) {
|
|
statsChannel.publish( { topic: "newTweets", data: data } );
|
|
} ),
|
|
target.on( "search.current", function( data ) {
|
|
searchChannel.publish( { topic: "search.current", data: data } );
|
|
} ),
|
|
target.on( "search.nodata", function( data ) {
|
|
searchChannel.publish( { topic: "search.nodata", data: data } );
|
|
} )
|
|
]
|
|
};
|
|
return target;
|
|
}; |