const BeforeOnce = ( options, fn ) => Before( options, function () { return this.tags.check( options.tags ).then( ( status ) => { if ( status === 'new' ) { return fn.call ( this ).then( () => this.tags.complete( options.tags ) ); } } ); } ); Converted to couroutine: const BeforeOnce = ( options, fn ) => Before( options, Promise.coroutine( function* () { let status = yield this.tags.check( options.tags ); if ( status === 'new' ) { yield fn.call( this ); yield this.tags.complect( options.tags ); } } ) );