1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

shorter uid

This commit is contained in:
Rokt33r
2016-05-14 18:47:09 +09:00
parent 735b79a4e0
commit 00691f1225

View File

@@ -2,6 +2,6 @@ const crypto = require('crypto')
const _ = require('lodash') const _ = require('lodash')
module.exports = function (length) { module.exports = function (length) {
if (!_.isFinite(length)) length = 12 if (!_.isFinite(length)) length = 6
return crypto.randomBytes(length).toString('hex') return crypto.randomBytes(length).toString('hex')
} }