Generates unique string identifiers in Node.js using the same algorithm as MongoDB's ObjectId. Version 1.0.0, stable but unmaintained since 2017. Key differentiators: performant (outperforms bson, mongoid, objectid in benchmarks), simple API with only a few configuration options (machineId, processId, sequence), and no dependencies. Suitable for generating unique IDs without a database, especially for Redis keys.
npm install mdbidNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates default usage, customization of machine/process/sequence, and accessing the version string.
Consider migrating to modern alternatives like 'nanoid' or 'uuid'.
Use 'crypto.randomUUID()' or 'uuid/v4' for secure random IDs.
Explicitly set machineId and processId for multi-process environments.
No action needed.
Run 'npm install mdbid' and ensure correct import path (e.g., require('mdbid')).Use 'import oid from 'mdbid' or 'const oid = require('mdbid')'.No dependency data recorded yet.