Charsets
Charsets are a set of characters that will be used for obfuscation.
Valid Charset
A valid charset must be an object that contains key-value pairs where:
- The key is the character to be replaced. It must be a single alphabet character (
a-z
,A-Z
). - The value is an array of characters that will replace the key. It must be an array of any single character other than the control characters and private use characters.
Below is an example of a valid charset in JSON and JavaScript object.
-
JSON
-
JavaScript
See the built-in charsets for more examples.
Built-in Charsets
Below is the built-in charsets available. You can use the name of the charset as a string in the charSets option.
Charset Name | Block Name | Block Range |
---|---|---|
latin | Basic Latin | \u0000 - \u007f |
latin-1 | Latin-1 Supplement | \u0080 - \u00ff |
latin-ext-a | Latin Extended-A | \u0100 - \u017f |
latin-ext-b | Latin Extended-B | \u0180 - \u024f |
See the details of each charsets in the package repository.