Sha256: cb930ea05a5328a047c04f2af2369e5dc8d87c7b40cf002f7a32100a010882a4

Contents?: true

Size: 370 Bytes

Versions: 89

Compression:

Stored size: 370 Bytes

Contents

/**
 * Module exports.
 */

module.exports = on;

/**
 * Helper for subscriptions.
 *
 * @param {Object|EventEmitter} obj with `Emitter` mixin or `EventEmitter`
 * @param {String} event name
 * @param {Function} callback
 * @api public
 */

function on(obj, ev, fn) {
  obj.on(ev, fn);
  return {
    destroy: function(){
      obj.removeListener(ev, fn);
    }
  };
}

Version data entries

89 entries across 89 versions & 3 rubygems

Version Path
blackboard-3.1.9 lib/site_template/node_modules/socket.io-client/lib/on.js
flok-0.0.105 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.103 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.102 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
gulp_assets-1.0.0.pre.5 template/node_modules/webpack-dev-server/node_modules/socket.io-client/lib/on.js
gulp_assets-1.0.0.pre.4 template/node_modules/webpack-dev-server/node_modules/socket.io-client/lib/on.js
gulp_assets-1.0.0.pre.3 template/node_modules/webpack-dev-server/node_modules/socket.io-client/lib/on.js
flok-0.0.101 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.100 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.99 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.98 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.97 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.96 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.95 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.94 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.93 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.92 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.91 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.90 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js
flok-0.0.89 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/lib/on.js