New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ab-models

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ab-models - npm Package Compare versions

Comparing version 1.0.19 to 1.0.20

2

package.json
{
"name": "ab-models",
"version": "1.0.19",
"version": "1.0.20",
"description": "",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -26,4 +26,7 @@ var bcrypt = require('bcrypt-nodejs');

userSchema.pre('save', function (next) {
console.log('empty state 1', this.isNew);
//emptyState(this, next);
if (this.isNew) {
emptyState(this, next);
} else {
next();
}
});

@@ -48,4 +51,6 @@

userSchema.pre('save', function(next) {
this.apiKey = crypto.randomBytes(4).toString('hex');
this.apiSecret = crypto.randomBytes(16).toString('hex');
if (this.isNew) {
this.apiKey = crypto.randomBytes(4).toString('hex');
this.apiSecret = crypto.randomBytes(16).toString('hex');
}
next();

@@ -52,0 +57,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc