This file contains 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
// Simple if condition that stops Observable from continuing passed condition function returns false. | |
// There's also an option to run else callback if needed. | |
/* | |
* USAGE | |
* | |
* of(events).pipe( | |
* ifCondition(event => event.name.endsWith('anything'), () => console.log('Not the anything event')) | |
* ) | |
*/ |