Page MenuHomePhabricator
Authored By
EBernhardson
Nov 17 2017, 4:08 PM
Size
630 B
Referenced Files
None
Subscribers
None
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 );
}
} ) );

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5099334
Default Alt Text
(630 B)

Event Timeline