How to use the call function from events

Find comprehensive JavaScript events.call code examples handpicked from public code repositorys.

431
432
433
434
435
436
437
438
439
440
441
442
443
exports.Decoder = Decoder;


util.inherits(Encoder, EventEmitter);


function Encoder() {
  EventEmitter.call(this);
}


/**
 * Encode streams to placeholder objects.
fork icon2
star icon2
watch icon0

+ 2 other calls in file

3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670


// old-style streams.  Note that the pipe method (the only relevant
// part of this class) is overridden in the Readable class.


function Stream() {
  EE.call(this);
}


Stream.prototype.pipe = function(dest, options) {
  var source = this;
fork icon0
star icon0
watch icon1

1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
module.exports = function (console) {


// Don't use `new SIP.EventEmitter()` for inheriting.
// Use Object.create(SIP.EventEmitter.prototoype);
function EventEmitter () {
  NodeEventEmitter.call(this);
}


EventEmitter.prototype = Object.create(NodeEventEmitter.prototype, {
  constructor: {
fork icon0
star icon0
watch icon1