npm bson 4.3.0

latest releases: 6.7.0, 6.6.0, 6.5.0...
3 years ago

The MongoDB Node.js team is pleased to announce version 4.3.0 of the bson module!

Release Highlight

UUID Support

With this feature release we are introducing improved support for UUID usage in BSON.
UUIDs in BSON are still a subset of Binary so there is a translation that must occur to use UUIDs in BSON documents.

For example:

// import { UUID, serialize, deserialize } from 'bson'
const { UUID, serialize, deserialize } = require('bson')

const myId = new UUID();
const bsonBuffer = serialize({ myId: myId.toBinary() })
const bsonResult = deserialize(bsonBuffer)
myId.equals(bsonResult.myId.toUUID()) // true!

Full API documentation for the new class will be available here soon after this release.

Documentation

We invite you to try the bson library immediately, and report any issues to the NODE project. A special thanks to @steffenagger for his contribution to the library!

Don't miss a new bson release

NewReleases is sending notifications on new releases.