
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
id-generator
Advanced tools
Generates unique ids using uuid and an running number.
Useful for enviroments where the cost of generating a new uuid each time is too high or when id generation is distributed and one does not want to coordinate uniqueness.
By default, when the counter reaches 2^53 it will reset and a new uuid will be generated.
npm install id-generator
var Generator = require('id-generator')
var g = new Generator()
console.log(g.newId()) // outputs: 049f2d25-f1ec-424a-999b-51d2a34aedff.1
console.log(g.newId()) // outputs: 049f2d25-f1ec-424a-999b-51d2a34aedff.2
console.log(g.newId()) // outputs: 049f2d25-f1ec-424a-999b-51d2a34aedff.3
g.reset() // reset will occur after 2^53 invocations of newId() by default, but you can change that by doing g.max=123
console.log(g.newId()) // outputs: 4ea9b5d9-e616-45f6-bdf4-11d382062fdc.1
console.log(g.newId()) // outputs: 4ea9b5d9-e616-45f6-bdf4-11d382062fdc.2
console.log(g.newId()) // outputs: 4ea9b5d9-e616-45f6-bdf4-11d382062fdc.3
g.on('reset', function(g) {
console.log(g.prefix) // outputs 4ea9b5d9-e616-45f6-bdf4-11d382062fdc
})
// Override uuid prefix with something else
var anotherG = new Generator(function () { return 'bar' })
console.log(g.newId()) // outputs: bar.1
console.log(g.newId()) // outputs: bar.2
from command line:
> id-generator --count=10
FAQs
generate unique ids
The npm package id-generator receives a total of 7 weekly downloads. As such, id-generator popularity was classified as not popular.
We found that id-generator 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.