Skip to content

Commit

Permalink
Replace slug by slugg
Browse files Browse the repository at this point in the history
  • Loading branch information
jledentu committed Oct 7, 2017
1 parent 8fb3c53 commit c7ff056
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import slug from 'slug';
import slug from 'slugg';
import uuid from 'uuid/v4';

function SlugsHook(sails) {
Expand Down Expand Up @@ -46,7 +46,7 @@ function SlugsHook(sails) {

model.beforeCreate = ((previousBeforeCreate, from, blacklist) => function(values, cb) {

let slugName = slug(values[from], {lower: sails.config.slugs.lowercase});
let slugName = slug(values[from], { toLowerCase: sails.config.slugs.lowercase });

// Check that slug is not already used
slugCanBeUsed(slugName, modelName, name, blacklist)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"should": "^13.1.1"
},
"dependencies": {
"slug": "^0.9.1",
"slugg": "^1.2.1",
"uuid": "^3.0.1"
}
}

0 comments on commit c7ff056

Please sign in to comment.