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
'use strict'; | |
const EventEmitter = require('events'); | |
/** | |
* Runs generator and puts EventEmitter context in it to let user | |
* emit any events inside generator and subscribe to them from outside. | |
* | |
* @param {Function} gen Function which returns generator | |
* @return {EventEmitter} Returns emitter instance which is bound |
NewerOlder