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

mongoose-url-slugs

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-url-slugs - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

index.js

@@ -36,3 +36,2 @@ var extend = require('extend');

schema.methods.ensureUniqueSlug = function (slug, cb) {
console.log('ensureUniqueSlug Doc:', this);
if (!options.index_unique) return cb(null, true, slug);

@@ -70,3 +69,4 @@ var doc = this;

var doc = this;
if (!doc.isNew && !options.update) return next();
var currentSlug = doc.get(options.field, String);
if (!doc.isNew && !options.update && currentSlug) return next();

@@ -73,0 +73,0 @@ var slugFieldsModified = doc.isNew? true : false;

@@ -9,3 +9,3 @@ {

"description": "Create URL compatiable slugs on mongoose models, ensuring uniqueness.",
"version": "0.0.4",
"version": "0.0.5",
"keywords": [

@@ -12,0 +12,0 @@ "mongoose slugs",

@@ -67,3 +67,3 @@ # Mongoose URL Slugs

* v0.0.4 (2014-06-10) -- Initial release.
* v0.0.5 (2014-06-10) -- Initial release.

@@ -70,0 +70,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