mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
8 lines
192 B
JavaScript
8 lines
192 B
JavaScript
const crypto = require('crypto')
|
|
const _ = require('lodash')
|
|
|
|
module.exports = function (length) {
|
|
if (!_.isFinite(length)) length = 10
|
|
return crypto.randomBytes(length).toString('hex')
|
|
}
|