
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
mongo-ticket
Advanced tools
simple implementation of a single use "ticket", built with mongodb and node.js
npm install mongo-ticket
autoConnect
whether you want mongo-ticket to immediately connect to the database. If set to false you will have to call the connect method directly (default: true)collection
the name to use for the collection that will store tickets (default: 'mongoTicket')stringify
whether you want mongo-ticket to try
to use JSON.stringify
and JSON.parse
when storing and retrieving tickets (default: true)var mongoTicket = new MongoTicket('mongodb://localhost:27017/mongo-ticket', function (err, db) {
if (err) // ...
mongoTicket.set('qwerty', 'keyboard cat', function (err) {
// ...
});
});
Later on...
mongoTicket.get('qwerty', function (err, val) {
if (err) // ....
console.log(val); // => 'keyboard cat'
})
connect(callback)
connects to the database with the provided mongodb uri. This is called for you unless to specify autoConnect: false
in the optionsget(ticket, callback)
gets a ticket and removes it if found. The arity of the callback is (error, ticketValue), where error is null unless something went wrong, and ticketValue is the (optionally parsed) value stored in the ticket.set(ticket, ticketValue, callback)
sets ticket with the given value. The callback is passed directly to the mongodb driver's insert methodFAQs
simple implementation of a single use "ticket", built with mongodb and node.js
We found that mongo-ticket 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.