alphabets
constalphabets:object
Defined in: src/strings/alphabet.ts:17
The named alphabets string() accepts, for building your own.
Type Declaration
Section titled “Type Declaration”alphanumeric
Section titled “alphanumeric”
readonlyalphanumeric:string
readonlyascii: “!"#$%&‘()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}” = “!"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}”
base32
Section titled “base32”
readonlybase32:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
base32hex
Section titled “base32hex”
readonlybase32hex:"0123456789ABCDEFGHIJKLMNOPQRSTUV"="0123456789ABCDEFGHIJKLMNOPQRSTUV"
base58
Section titled “base58”
readonlybase58:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
base62
Section titled “base62”
readonlybase62:string
base64url
Section titled “base64url”
readonlybase64url:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
binary
Section titled “binary”
readonlybinary:"01"="01"
digits
Section titled “digits”
readonlydigits:"0123456789"=DIGITS
readonlyhex:"0123456789abcdef"="0123456789abcdef"
hexUpper
Section titled “hexUpper”
readonlyhexUpper:"0123456789ABCDEF"="0123456789ABCDEF"
letters
Section titled “letters”
readonlyletters:string
readonlylower:"abcdefghijklmnopqrstuvwxyz"=LOWER
readonlyoctal:"01234567"="01234567"
unambiguous
Section titled “unambiguous”
readonlyunambiguous:"23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"="23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
readonlyupper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"=UPPER
Example
Section titled “Example”import { alphabets, string } from "ransu";
string(8, alphabets.lower); // "qmzdfhbx"string(8, alphabets.alphanumeric); // the defaultstring(8, alphabets.hex + alphabets.upper); // combine them as strings