Huge News!Announcing our $40M Series B led by Abstract Ventures.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.6 to 0.0.7

6

index.js
var extend = require('extend');
function defaultURLSlugGeneration(text, separator) {
return text.toLowerCase().replace(/([^a-z0-9\-\_]+)/g, separator).replace(new RegExp(separator + '{2,}', 'g'), separator);
var slug = text.toLowerCase().replace(/([^a-z0-9\-\_]+)/g, separator).replace(new RegExp(separator + '{2,}', 'g'), separator);
if (slug.substr(-1) == seperator) {
slug = slug.substr(0, slug.length-1);
}
return slug;
}

@@ -6,0 +10,0 @@

2

package.json

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

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

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

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

* v0.0.7 (2014-06-10) -- slug generation improved.
* v0.0.6 (2014-06-10) -- incremented slug generation bug fix and minor optimizations.

@@ -69,0 +70,0 @@ * v0.0.5 (2014-06-10) -- Initial release.

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