doorbell

    1.0.1 • Public • Published

    Doorbell

    Event System

    Doorbell is an Event Emitter written in NodeJS that expands any object to be event driven.

    INSTALLING

    Using Git:

    git clone https://github.com/active9/doorbell
    cd doorbell*
    npm install

    Using NPM:

    npm install doorbell

    MODULE

    Above may run included as a module in your projects.

    var doorbell = require('doorbell');
     
    // A Function To Inject The DoorBell Event System Into
    var test = {
        something: function(text) {
            console.log(text);
        }
    }
     
    // Merge The Test Object With The DoorBell Event System
    test = doorbell(test);
     
    // Set An Event On BingBong
    test.on('bingbong', function() {
        this.something('Knock Knock');
    });
     
    // Emit The Event
    test.emit('bingbong');
     

    ~Enjoy!

    CONTRIB

    Doorbell is open-source via the MIT license we encourage Forking.

    LICENSE

    MIT

    Install

    npm i doorbell

    DownloadsWeekly Downloads

    12

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • active9