Skip to content

Commit

Permalink
add dependencies status
Browse files Browse the repository at this point in the history
  • Loading branch information
Phelipe de Sterlich committed Apr 10, 2015
1 parent ee01c21 commit d17fdb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
slugin
======

[![Dependency Status](https://david-dm.org/mrphelz/slugin.svg?theme=shields.io)](https://david-dm.org/mrphelz/slugin) [![devDependency Status](https://david-dm.org/mrphelz/slugin/dev-status.svg?theme=shields.io)](https://david-dm.org/mrphelz/slugine#info=devDependencies)

Unique URL-friendly slugs plugin for mongoose that is lightweight, concurrency safe, but also follows the normal mongoose plugin pattern. Unlike some of the other offerings in NPM, this one also requires minimal effort on your part by using the standard mongoose plugin syntax.

based on Paul Vencill's [slugin](https://github.com/pvencill/slugin) plugin
Expand Down Expand Up @@ -38,4 +40,4 @@ In most cases you'll use the Schema syntax of YourSchema.plugin(slugin, options)

* `slugName` - What property you want created on your schema to store the completed slug. Defaults to 'slug'. Also creates a pair of properties to hold the string and numeric parts of the slug for more efficient querying. Those will be {slugName}_base and {slugName}_it respectively.
* `source` - The property or properties on your schema that you want to use as the source of the slug. Can be a string property name or array of properties. Defaults to 'title'.
* `modelName` - The name you use to store your schema in mongoose when you call mongoose.model('modelName', schema). Defaults to pascal-casing the mongodb collection name for your model (e.g. the mongodb collection name "posts" will be interpreted as a modelName 'Posts').
* `modelName` - The name you use to store your schema in mongoose when you call mongoose.model('modelName', schema). Defaults to pascal-casing the mongodb collection name for your model (e.g. the mongodb collection name "posts" will be interpreted as a modelName 'Posts').

0 comments on commit d17fdb8

Please sign in to comment.