Each component is an instance of Emitter module.
npm install spa-componentAdd the singleton to the scope:
var component = require('spa-component');Show the component (hiding is identical):
// sync
component.show(someData);
// async
component.show(someData, function () {
// ready
});There is a global var
DEVELOPwhich activates additional consistency checks and protection logic not available in release mode.
If you have any problems or suggestions please open an issue according to the contribution rules.
spa-component is released under the MIT License.