
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@ccondry/mongo-wrapper
Advanced tools
A simple wrapper for mongodb. Handles connection pooling for you.
A simple wrapper for mongodb. Handles connection pooling for you.
// this library
const mongo = require('@ccondry/mongo-wrapper')
// your mongo database URL / connection string
const url = 'mongodb+srv://user:password@host/?retryWrites=true'
// optional - these are the default values
const connectOptions = {
useNewUrlParser: true,
poolSize: 5,
useUnifiedTopology: true
}
// optional - this is the default value
const logLevel = 1
// create the wrapper object
const db = new mongo(url, connectOptions, logLevel)
// this would also work to create the wrapper object
// const db = new mongo(url)
// set up projection to exclude password from results
const projection = {password: 0}
// find one user in the toolbox database, excluding the password field
db.findOne('toolbox', 'users', {email: 'ccondry@cisco.com'}, {projection})
.then(r => console.log('found user:', r))
.catch(e => console.log('error:', e.message))
// find list of enabled users in the toolbox database, excluding the password field
db.find('toolbox', 'users', {disabled: false}, projection)
.then(r => console.log('found user:', r))
.catch(e => console.log('error:', e.message))
2023.2.8
FAQs
A simple wrapper for mongodb. Handles connection pooling for you.
We found that @ccondry/mongo-wrapper 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.