Skip to content

Commit

Permalink
remove random_char
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanatkn committed Dec 8, 2023
1 parent 447879c commit fc99da6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-gifts-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@grogarden/util': minor
---

remove random_char
5 changes: 0 additions & 5 deletions src/lib/random.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ export const random_boolean = (random = Math.random): boolean => random() > 0.5;
export const random_item = <T>(arr: T[], random = Math.random): T =>
arr[random_int(0, arr.length - 1, random)];

export const random_char = (chars = alphanumerics, random = Math.random): string =>
random_item(chars, random);

const alphanumerics = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.split('');

/**
* Mutates `array` with random ordering.
*/
Expand Down
1 change: 0 additions & 1 deletion src/routes/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ export const src_json = {
{name: 'random_int', kind: 'function'},
{name: 'random_boolean', kind: 'function'},
{name: 'random_item', kind: 'function'},
{name: 'random_char', kind: 'function'},
{name: 'shuffle', kind: 'function'},
],
},
Expand Down

0 comments on commit fc99da6

Please sign in to comment.