Created
April 24, 2016 15:24
-
-
Save TheLarkInn/db362a245cde71acde6bc17c3562b4ee to your computer and use it in GitHub Desktop.
My implementation of the supports() function for our custom event.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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