PhaultLines

Using cancellation with async iterators in JavaScript

Chrome 63, released in December, included async iterators and the associated for-await-of syntax. As the feature is now official in V8 6.3, it’s also likely to land in the upcoming Node.js 10 release this April. In light of its imminent availability in Node.js, I figured that it was time to start exploring the real-world potential of async iterators on the backend. Combining the async and await keywords with generator functions provides an elegant way to express streaming operations in modern JavaScript applications.

Continue Reading ›