
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
shorter-mongo-id
Advanced tools
Generate short id's from MongoDB Object ID's for use in url's or other applications.
This is a spin-off from treygriffith's short-mongo-id, we needed ours to be even shorter
Id's are generated from the timestamp and counter of the MongoDB Id, with some slight variation. They should be reasonably unique.
This is, unfortunately, a one-way function. It will reliably produce the same short id for the same MongoDB Id, but the operation can't be reversed (it is missing information about the machine id, process id, and most of the counter).
Use NPM:
$ npm install shorter-mongo-id
or Git:
$ git clone git://git@github.com/bizzby/short-mongo-id.git
Pass a MongoDB ObjectId (or a string that can be converted to one) and it will return a reasonably unique short id made of [A-Z0-9].
var shortId = require('shorter-mongo-id');
var id = shortId("507f191e810c19729de860ea"); // returns "AAAVWE8"
MIT (see License)
FAQs
Even shorter id generation from MongoDB ObjectId's
We found that shorter-mongo-id demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.