function nanoId(length) {
    length = Math.max(length | 0, 0) || 21
    const size = (length * 5 + 7) >>> 3

    const buffer = Buffer.allocUnsafeSlow(size)

    crypto.randomFillSync(buffer, 0, size)

    return encodeNanoId(buffer, length, size)
}
Generates a secure and URL-friendly unique ID.
Based on https://github.com/luavixen/foxid
@param {number} [length] - Length of the generated ID, defaults to 21.
@returns {string} Newly generated ID as a string.