npm bson 6.9.0
v6.9.0

one day ago

6.9.0 (2024-10-15)

The MongoDB Node.js team is pleased to announce version 6.9.0 of the bson package!

Release Notes

Timestamp now has t and i properties

To make this type a bit easier to use we are surfacing the breakdown of the two internal 32 bit segments of a Timestamp value.

const ts = new Timestamp({ i: 2, t: 1 });
ts.i // 2
ts.t // 1

ObjectId.isValid(string) performance improvement

Often used to validate whether a hex string is the correct length and proper format before constructing an ObjectId for querying, the isValid function will validate strings much faster than before. Many thanks to @SeanReece for the contribution!

Serialization performance improved.

Optimizations have been implemented with respect to BSON serialization across the board, resulting in up to 20% gains in serialization with a sample of MFlix documents. Thanks again to @SeanReece for the contribution!

Features

Performance Improvements

Documentation

We invite you to try the bson library immediately, and report any issues to the NODE project.

Don't miss a new bson release

NewReleases is sending notifications on new releases.