The MongoDB Node.js team is pleased to announce version 5.2.0 of the bson package!
Release Highlights
With this release we've added APIs to create BSON Binary
/ UUID
/ ObjectId
types from hex and base64 strings.
class ObjectId {
static createFromHexString(hex: string): ObjectId;
static createFromBase64(base64: string): ObjectId;
}
class Binary {
static createFromHexString(hex: string, subType? number): Binary;
static createFromBase64(base64: string, subType? number): Binary;
}
class UUID extends Binary {
static override createFromHexString(hex: string): UUID;
static override createFromBase64(base64: string): UUID;
}
Features
Documentation
- API: https://github.com/mongodb/js-bson#readme
- Changelog: https://github.com/mongodb/js-bson/blob/main/HISTORY.md#change-log
We invite you to try the bson library immediately, and report any issues to the NODE project.