UNPKG
nodejs_training
Version:
latest (1.0.0)
1.0.0
Demo of nodejs
nodejs_training
/
eventEmitterDemo.js
8 lines
•
200 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
exports
.
logger
= (
function
(
) {
var
module
=
require
(
'events'
);
var
log =
new
module
.
EventEmitter
(); log.
on
(
'error'
,
function
(
callBackFunc
){
callBackFunc
(); })
return
log; })();