Add the type property to package.json to ensure modules are supported:
{
"type": "module",
}| const CHARSET_LOWER = "abcdefghijklmnopqrstuvwxyz"; | |
| const CHARSET_UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
| const CHARSET_NUM = "0123456789"; | |
| const CHARSET_ALPHA = CHARSET_LOWER + CHARSET_UPPER; | |
| const CHARSET_ALNUM = CHARSET_ALPHA + CHARSET_NUM; | |
| const CHARSET_ALNUM_SANE = CHARSET_ALNUM.replace(/O|l|I/g, ""); | |
| // const CHARSET_PUNC = "!@#$%^&*-_=+[]{}|;:,.<>/?~"; | |
| // I shortened the possible punctuation chars due to incompatibility with various sites: | |
| const CHARSET_PUNC = "!@#$%^&*"; | |
| const CHARSET_HEX = CHARSET_NUM + "abcdef"; |