var Emitter = require('y-emitter'),
emitter = new Emitter(),
target = emitter.target;
target.walk(function* listener(){
yield this.until('click');
console.log('click');
yield this.until('clock');
console.log('clock');
this.walk(listener);
});
emitter.give('click'); // click
emitter.give('clock'); // clock
emitter.give('clock');
emitter.give('click'); // click
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Yielding emitter
License
manvalls/y-emitter
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Yielding emitter
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published