Use shortid

This commit is contained in:
typicode
2016-10-06 00:22:22 +02:00
parent 954c0b61d3
commit 3b93abafbc
2 changed files with 3 additions and 3 deletions

View File

@ -20,11 +20,11 @@
"lowdb": "^0.13.1",
"method-override": "^2.1.2",
"morgan": "^1.3.1",
"node-uuid": "^1.4.2",
"object-assign": "^4.0.1",
"pluralize": "^3.0.0",
"request": "^2.72.0",
"server-destroy": "^1.0.1",
"shortid": "^2.2.6",
"underscore-db": "^0.12.0",
"update-notifier": "^1.0.2",
"yargs": "^4.2.0"

View File

@ -1,4 +1,4 @@
const uuid = require('node-uuid')
const shortid = require('shortid')
const pluralize = require('pluralize')
module.exports = {
@ -46,7 +46,7 @@ function createId (coll) {
// Increment integer id or generate string id
return _.isFinite(id)
? ++id
: uuid()
: shortid.generate()
}
}