Back to Daily Feed 
Three New Iterator Methods Reach TC39 Stage 4: Chunking, Includes, Join
Editor's Pick
Originally published on TC39 Proposals (commits)
View Original Article
Share this article:
Summary & Key Takeaways
- Three new proposals have been promoted to TC39 Stage 4.
Iterator.prototype.chunk()allows splitting an iterator into chunks of a specified size.Iterator.prototype.includes()checks if an iterator contains a specific value.Iterator.prototype.join()concatenates the string representations of an iterator's elements.- These methods are now part of the official JavaScript standard.
Our Commentary
YES! More iterator methods are always a win for functional programming patterns in JavaScript. chunk() is something I've wanted for ages, and includes() and join() just make iterators feel more complete. This is a solid set of additions that will definitely streamline a lot of common data manipulation tasks.
View Original Article
Share this article: