Skip to content

Instantly share code, notes, and snippets.

@matsko
Last active September 24, 2015 07:36
Show Gist options
  • Save matsko/89b89070458eb073b5a4 to your computer and use it in GitHub Desktop.
Save matsko/89b89070458eb073b5a4 to your computer and use it in GitHub Desktop.
trigger(element, event: string, data): Promise<any> {
if (this.isSelectorMatch(element)) {
var operations = this._lookup[event];
return operations.length
? operations.filter((op) => op.test(element, data))
.map((op) => wrap(op.fn(element, data)))
: noopPromise;
}
return noopPromise;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment