
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.
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.
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
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.