How to use the event-emitter.methods function in event-emitter

To help you get started, we’ve selected a few event-emitter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github medikoo / domjs / ext / _element.js View on Github external
exports.replaceContent  = require('dom-ext/element/#/replace-content');

exports.toggle = function (value) {
	if (value) include.call(this);
	else exclude.call(this);
};
exports.query = function (selector) {
	return this._domjs.normalize(this.querySelector(selector));
};
exports.queryAll = function (selector) {
	var list = this.querySelectorAll(selector);
	forEach.call(list, this._domjs.normalize, this._domjs);
	return list;
};

assign(exports, require('event-emitter').methods);