Javascript/Ajax/JQuery

Digging Into Event Emitters In Node.JS

In extension to my previous blog on Event Emitters Event Emitters In Node.JS, here we will see some variations in implementing Event Emitters. We can bind more than one listeners to an event. For example: [js] var events = require('events'); var eventEmitter = new events.EventEmitter(); var printFruit = function printFruit() { ...

by Sakshi Tyagi
Tag: event emitters
23-Jan-2014

Javascript/Ajax/JQuery

Event Emitters In Node.JS

Event Emitters are used to create and manage our own events and trigger them accordingly. We can bind listeners and emit those events whenever required. Example : [js] var events = require('events'); var eventEmitter = new events.EventEmitter(); eventEmitter.on('Morning', function welcomeMessage() { console.log('Good...

by Sakshi Tyagi
Tag: event emitters
03-Jan-2014