StratifiedJS (http://onilabs.com/stratifiedjs) is an alternative to the await/defer paradigm that offers finer-grained control structures, with intuitive names like waitfor and resume.
| console.log('this code will run right away...'); |
| waitfor() { |
| setTimeout(resume, 500); |
| } |
| console.log('...and this will run 500ms later.'); |
Although not widely used, StratifiedJS is an ambitious project that’s received praise from the likes of John Resig (the creator of jQuery).[62] Note that StratifiedJS is the name of the specification, not the implementation; the official reference implementation is called Oni Apollo.[63]
3.144.232.137