Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
mongo-ticket
Advanced tools
simple implementation of a single use "ticket", built with mongodb and node.js
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
The npm package mongo-ticket receives a total of 0 weekly downloads. As such, mongo-ticket popularity was classified as not popular.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.