index.js
function listener (event, done) {
  return function onevent (arg1) {
    var args = new Array(arguments.length)
    var ee = this
    var err = event === 'error'
      ? arg1
      : null

    // copy args to prevent arguments escaping scope
    for (var i = 0; i < args.length; i++) {
      args[i] = arguments[i]
    }

    done(err, ee, event, args)
  }
}
function listener (event, done) {
  return function onevent (arg1) {
    var args = new Array(arguments.length)
    var ee = this
    var err = event === 'error'
      ? arg1
      : null

    // copy args to prevent arguments escaping scope
    for (var i = 0; i < args.length; i++) {
      args[i] = arguments[i]
    }

    done(err, ee, event, args)
  }
}
function listener ( event , done ) { return function onevent ( arg1 ) { var args = new Array ( arguments . length ) var ee = this var err = event === 'error' ? arg1 : null // copy args to prevent arguments escaping scope for ( var i = 0 ; i < args . length ; i ++ ) { args [ i ] = arguments [ i ] } done ( err , ee , event , args ) } }
Create the event listener.
@private
Create the event listener .