(input = "")
| 55 | } |
| 56 | |
| 57 | const hash = (input = "") => { |
| 58 | // Drop the first character because it will bias the histogram |
| 59 | // to the left. |
| 60 | const encoder = new TextEncoder(); |
| 61 | return bufToBigInt(sha3(encoder.encode(input))) |
| 62 | .toString(36) |
| 63 | .slice(1); |
| 64 | }; |
| 65 | |
| 66 | const alphabet = Array.from({ length: 26 }, (x, i) => |
| 67 | String.fromCharCode(i + 97), |
no test coverage detected
searching dependent graphs…