1.1.0 • Published 8 years ago

wadofgum-events v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

wadofgum-events Build Status

An eventing mixin for wadofgum based on spit.

Usage

This module adds emit and on methods to your model class which can be used just as you would use the spit module by itself. To load it, apply it as a mixin to the base wadofgum module.

The only event emitted by default is the create event, which will be triggered every time an instance of your class is created passing the instance as the parameter.

const Wadofgum = require('wadofgum');
const Events = require('wadofgum-events');

class Model extends Wadofgum.mixin(Events) {};
Model.on('test', function () {
});

Model.emit('test');
1.1.0

8 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago