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.5 to 0.0.6

8

index.js

@@ -49,4 +49,8 @@ var extend = require('extend');

var max = docs.reduce(function (max, doc) {
var count = doc.get(options.field, String).match(new RegExp(options.separator + '([0-9]+)$'));
count = ((count instanceof Array)? parseInt(count[1]) : 0) + 1;
var docSlug = doc.get(options.field, String);
var count = 1;
if (docSlug != slug) {
count = docSlug.match(new RegExp(slug + options.separator + '([0-9]+)$'));
count = ((count instanceof Array)? parseInt(count[1]) : 0) + 1;
}
return (count > max)? count : max;

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

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

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

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

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

* v0.0.6 (2014-06-10) -- incremented slug generation bug fix and minor optimizations.
* v0.0.5 (2014-06-10) -- Initial release.

@@ -69,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