Skip to content

Commit

Permalink
chore(deps): bump nanoid to 3.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yong-jie committed Apr 7, 2022
1 parent 02a0619 commit e6945eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
21 changes: 9 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"moment": "^2.29.2",
"moment-timezone": "^0.5.33",
"morgan": "^1.10.0",
"nanoid": "^2.1.11",
"nanoid": "^3.3.2",
"nodemailer": "^6.6.2",
"pg": "^8.6.0",
"pg-connection-string": "^2.5.0",
Expand Down Expand Up @@ -123,7 +123,6 @@
"@types/lodash": "^4.14.170",
"@types/moment-timezone": "^0.5.30",
"@types/morgan": "^1.9.3",
"@types/nanoid": "^2.1.0",
"@types/node": "^15.14.0",
"@types/pg": "^8.6.2",
"@types/qrcode": "^1.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/client/app/util/url.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import generate from 'nanoid/async/generate'
import { customAlphabet } from 'nanoid/async'

const ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz'
const LENGTH = 6
Expand All @@ -10,7 +10,7 @@ const LENGTH = 6
* (1e6 / (36^6) = 0.000459, or one in 2176.
*/
export async function generateShortUrl() {
return generate(ALPHABET, LENGTH)
return customAlphabet(ALPHABET, LENGTH)
}

/**
Expand Down

0 comments on commit e6945eb

Please sign in to comment.