
Security News
NIST Officially Stops Enriching Most CVEs as Vulnerability Volume Skyrockets
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.
A very thin convenience wrapper for the Mongo client.
npm i mowr
const db = require('mowr')('localhost:27017/test', options)
const collection = db.get('collection')
const collection = require('mowr')('localhost/test', options).get('collection')
collection.find(query, options) // returns array
collection.findc(query, options) // returns cursor
collection.findOne(query, options) // returns object
collection.insert(object/array, options) // returns inserted object/array
collection.insertOne(object, options) // returns inserted object
collection.insertMany(array, options) // returns inserted array
collection.updateOne(query, update, options) // -> {n: 1, nModified: 1, ok: 1}
collection.updateMany(query, update, options) // -> {n: 5, nModified: 5, ok: 1}
collection.replaceOne(query, update, options) // -> {n: 1, nModified: 1, ok: 1}
collection.deleteOne(query, options) // -> {n: 1, ok: 1}
collection.deleteMany(query, options) // -> {n: 5, ok: 1}
collection.findOneAndUpdate(query, update, options) // returns original document
collection.findOneAndReplace(query, update, options) // returns original document
collection.findOneAndDelete(query, options) // returns deleted document
Options are always optional, and passed as object.
When connecting, 'mongodb://' is prepended if needed, and useUnifiedTopology is set to true (pass it as option to set it to false).
The query field can be an _id string (it will be converted to {_id: <ObjectID>}) or a query object.
Depending on if an object or array is passed in, insert will call insertOne or insertMany.
If an update object contains an _id property, even if nested, it will be removed.
When passing options using find, findc, findOne, make sure to use a query (can be {}).
Thanks to @fuzetsu for his invaluable help!
FAQs
A very thin convenience wrapper for the Mongo client.
The npm package mowr receives a total of 16 weekly downloads. As such, mowr popularity was classified as not popular.
We found that mowr 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
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.