
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
A thin before/after filter extension for the mongojs node-module.
npm install mongohooks
var db = require('mongojs')('mydb', ['mycollection']);
var mongohooks = require('mongohooks');
// Add a before filter to db.mycollection.save
mongohooks(db.mycollection).onSave(function (document, next) {...});
// Add a before filter to db.mycollection.insert
mongohooks(db.mycollection).onInsert(function (document, next) {...});
// Add a before filter to db.mycollection.update
mongohooks(db.mycollection).onUpdate(function (query, <update>, next) {...});
// Add a before filter to db.mycollection.find
mongohooks(db.mycollection).onFind(function (criteria, <projection>, next) {...});
// Add an after filter to db.mycollection.find and db.mycollection.findOne
// The after filter is called once for each document in a returned result.
mongohooks(db.mycollection).onDocument(function (document, projection, next) {...});
// Filters are async: Call the `next` callback when you are done
mongohooks(db.mycollection).onFind(function (criteria, next) {
// do stuff
next();
});
// Before-filters can abort the execution by passing on an error
mongohooks(db.mycollection).onFind(function (criteria, next) {
next(new Error());
});
// After-filters can also parse on errors
mongohooks(db.mycollection).onDocument(function (document, projection, next) {
next(new Error());
});
// Use the `this` keyword to access the collection
mongohooks(db.mycollection).onUpdate(function (query, update, next) {
// perform a find before each update
this.findOne({ foo: 1 }, function (err, result) {
// do stuff
next();
});
});
// Filters can be chained and multiple filters of the same type can be added
mongohooks(db.mycollection)
.onUpdate(function (query, <update>, next) {...})
.onFind(function (criteria, <projection>, next) {...})
.onFind(function (criteria, <projection>, next) {...})
.onDocument(function (document, projection, next) {...});
// Now just use the reqular mongojs API
db.mycollection.find({ ... }, function (err, res) {...});
This module was hacked together in a post-drunken state at a Copenhagen Node.js Hackathon event in just a few hours. Bugs might exist.
MIT
FAQs
A thin before/after filter extension for the mongojs node-module
The npm package mongohooks receives a total of 3 weekly downloads. As such, mongohooks popularity was classified as not popular.
We found that mongohooks 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
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.