Functions9 public, 0 private

publicstringencodeBase64url
requiredstringbase64
Replaces various characters in the provided string for safe usage as filename.
publicstringencodeForFilename
requiredstringvalue
Converts the provided HTML and encodes it for JavaScript.
publicstringencodeHtmlForJS
requiredstringhtml
Wrapper for the native [encodeForJavaScript] function.
publicstringencodeForJavaScript
requiredstringvalue
anyOPTIONSfalse
optionbooleancanonicalizefalse
\n
optionbooleankeepNewLinestrue
Encodes a string to be used as JSON string value.
publicstringencodeForJSON
requiredstringvalue
Hashes the provided string using 32 Bit prime and offset values for the FNV1a algorithm (Fowler-Noll-Vo).
publicnumerichashFNV1a32
requiredstringvalue
Hashes the provided string using 64 Bit prime and offset values for the FNV1a algorithm (Fowler-Noll-Vo).
publicnumerichashFNV1a64
requiredstringvalue
Preserves all whitespaces while encoding the the provided string.
publicstringpreserveWhitespaces
requiredstringtext
Encodes the provided string as base64 using the safe alphabet according to RFC 4648.
publicstringtoBase64url
requiredbinary, stringtarget
stringencodingUTF-8
booleanremovePaddingtrue