tblobaum/mongoose-troop — pull request #5 by sorensen (2011-12-12 16:55:35+00:00)
Title: Slugification plugin

Converts source path into a url friendly slug.

Example with default options:

schema.plugin(troop.slugify, {
target: 'slug' // Slug destination
, source: 'name' // Slug content field
, maxLength: 50 // Max slug length
, spaceChar: '-' // Space replacement
, invalidChar: '' // Invalid char replacement
, override: false // Override slug on set
})