How to use the lunr.EventEmitter function in lunr

To help you get started, we’ve selected a few lunr 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 glennjones / mani / lib / index.js View on Github external
Mani.Index.prototype._configure = function (options) {
	this.version = Mani.version;

	this.options = (options)? options : {};
	this.options.name = (this.name)? this.name : 'Mani';

	this.eventEmitter =  new Lunr.EventEmitter
	this.documents = new Documents(this.options, this.eventEmitter);
    this._freetext = new FreeText(this.options, this.eventEmitter);
    this._match = new Match(this.options, this.eventEmitter);
    this._geo = new Geo(this.options, this.eventEmitter);
    this.eventEmitter.emit('configured', options, this);
}