MongoDB Resume Token Decoder

JSON →
library 1.1.2 ·javascript
verified Jun 5, 2026

A utility library for decoding MongoDB change stream resume tokens into their constituent components. Current stable version is 1.1.2, with an irregular release cadence focused on maintenance. It provides a simple decode function that extracts fields such as timestamp, version, tokenType, txnOpIndex, fromInvalidate, uuid, and documentKey from a hex-encoded resume token string. It also ships as a CLI via npx. Compared to manual parsing, this library handles the binary encoding details and BSON type mapping, reducing errors and development time.