Skip to content

Instantly share code, notes, and snippets.

@TheLarkInn
Created April 24, 2016 15:24
Show Gist options
  • Save TheLarkInn/db362a245cde71acde6bc17c3562b4ee to your computer and use it in GitHub Desktop.
Save TheLarkInn/db362a245cde71acde6bc17c3562b4ee to your computer and use it in GitHub Desktop.
My implementation of the supports() function for our custom event.
getMultiEventArray(eventName: string): string[] {
return eventName.split(",")
.filter((item, index): boolean => { return item && item != '' })
}
supports(eventName: string): boolean {
return this.getMultiEventArray(eventName).length > 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment