Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
di-short-mongo-id
Advanced tools
Readme
Generate short id's from MongoDB Object ID's for use in url's or other applications.
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 i -S di-short-mongo-id
Pass a MongoDB ObjectId (or a string that can be converted to one) and it will return a reasonably unique short id.
const shortId = require('di-short-mongo-id');
shortId("597b3ae1bca3cc7f2c33128e"); // returns "wrxtm4nb"
shortId("597b3afabca3cc7f2c331290"); // returns "87qum4nb"
shortId("597b3afabca3cc7f2c331290", true); // returns "87QUM4NB"
MIT (see License)
FAQs
Short id generation from MongoDB ObjectId's
The npm package di-short-mongo-id receives a total of 161 weekly downloads. As such, di-short-mongo-id popularity was classified as not popular.
We found that di-short-mongo-id demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.