Skip to content

Commit

Permalink
feat: remove ambiguous characters from auto-generated codes (#19)
Browse files Browse the repository at this point in the history
l, I, 1, O, 0 can cause confusion when reading URLs from print.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
  • Loading branch information
jakejarvis and kentcdodds committed Jan 28, 2020
1 parent 1ed0f33 commit 17f5732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function validateUrl(url) {
function generateCode() {
let text = ''
const possible =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789'

for (let i = 0; i < 5; i++) {
text += possible.charAt(Math.floor(Math.random() * possible.length))
Expand Down

0 comments on commit 17f5732

Please sign in to comment.