MongoDB Index Model
JSON →A utility library for parsing, validating, and formatting MongoDB index specifications. Version 4.1.2 provides a structured model to work with MongoDB index definitions, including index keys, options (like unique, sparse, TTL), and collation. It validates index definitions and provides helpers to convert between different representations (e.g., from shell syntax to driver objects). This package is part of the MongoDB Compass project, updated alongside Compass releases, with a stable API focused on internal use. It differentiates from direct driver use by offering higher-level validation and normalization of index specs, making it useful for tools and UIs that manage MongoDB indexes. ESM-only since v4; TypeScript types are bundled.
API endpoints
full doc /v1/registry/mongodb-index-model