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.3.9 to 1.3.10

2

package.json
{
"name": "ab-models",
"version": "1.3.9",
"version": "1.3.10",
"description": "",

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

var mongoose = require('../mongoose.js')();
var _ = require('lodash');
var crypto = require('crypto');

@@ -15,2 +16,6 @@ var schema = new mongoose.Schema({

email: String,
unsubscribeToken: String,
unsubscribed: { type: Boolean, default: false },
modified: { type: Date, default: Date.now },

@@ -20,2 +25,9 @@ created: { type: Date, default: Date.now }

schema.pre('save', function(next) {
if (this.isNew) {
this.unsubscribeToken = crypto.randomBytes(16).toString('hex');
}
next();
});
schema.virtual('id').get(function() {

@@ -22,0 +34,0 @@ if (this._id) {

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