Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
bookshelf-deep-changed
Advanced tools
Allows bookshelf models to check whether a value you are saving is different than the existing value in the database.
Allows bookshelf models to check whether a value you are saving is different than the existing value in the database.
Usage:
module.exports = Repository.Model.extend({
tableName: 'users',
initialize: function () {
this.on('updating', function (model, attrs, options) {
return this.deepChanged('name', 'email', options)
.then(function (hasDeepChanged) {
if (hasDeepChanged[0]) {
this.set('name_changed_at', new Date());
}
if (hasDeepChanged[1]) {
this.set('email_changed_at', new Date());
}
});
});
}
});
You need to add bookshelf-deep-changed to the list of bookshelf's plugins when you require bookshelf:
var knex = require('knex')({
/// knex initialization
}),
bookshelf = require('bookshelf')(knex);
bookshelf.plugin(require('bookshelf-deep-changed'));
FAQs
Allows bookshelf models to check whether a value you are saving is different than the existing value in the database.
The npm package bookshelf-deep-changed receives a total of 20 weekly downloads. As such, bookshelf-deep-changed popularity was classified as not popular.
We found that bookshelf-deep-changed 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.