← Blog
The Nub Team

Nub 0.9.6

The iterator chunking, includes and join helpers follow their Stage 4 specifications, and a stable release waits for the maintainer's approval of the staged npm versions.

The iterator chunking, includes and join helpers now follow their Stage 4 specifications, and a stable release waits for the maintainer's approval of the staged npm versions before it is published.

Iterator helpers

The chunks, windows, includes and join methods on Iterator.prototype follow the Stage 4 text of the iterator chunking, iterator includes and iterator join proposals. Two methods take a new optional argument:

// [[1, 2]]: one short window instead of none
Iterator.from([1, 2]).windows(3, "allow-partial").toArray();

// skips the first value before it searches
Iterator.from(statuses).includes("draft", 1);

A size or skip count is no longer coerced: a non-integral number throws a TypeError, and the arguments are checked before the first next call, so a failed check closes the receiver. join converts each value with ToString, as Array.prototype.join does, and the Promise.try polyfill constructs its result from this, so a subclass receives an instance of itself.

On Node 26.7 with the native methods removed, the test262 built-ins/Iterator and Promise/try suites pass 1180 of 1338 tests, up from 922, and the four methods pass all 140 of their tests on Node 18.19 through 26.7. @nubjs/types declares the new parameters. (#988)

Release pipeline

A stable release run stages its npm packages and is then held on a GitHub environment until the maintainer approves the staged versions with 2FA. The run resumes from that approval and publishes the GitHub Release. (#981)

The full release notes list every change in this release.

Get started

View repo