mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
shorter uid
This commit is contained in:
@@ -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')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user