4 [![Build Status](https://travis-ci.org/phated/sparkles.svg?branch=master)](https://travis-ci.org/phated/sparkles)
6 Namespaced global event emitter
10 Sparkles exports a function that returns a singleton `EventEmitter`.
11 This EE can be shared across your application, whether or not node loads
15 var sparkles = require('sparkles')(); // make sure to call the function
17 sparkles.on('my-event', function(evt){
18 console.log('my-event handled', evt);
21 sparkles.emit('my-event', { my: 'event' });
26 ### sparkles(namespace)
28 Returns an EventEmitter that is shared amongst the provided namespace. If no namespace
29 is provided, returns a default EventEmitter.
31 ### sparkles.exists(namespace);
33 Checks whether a namespace exists and returns true or false.
37 This is a "global emitter"; shortened: "glitter" but it was already taken; so we got sparkles instead :smile: