Documentation
¶
Overview ¶
Package nodebase64 reads base64 text as Node's Buffer.from(text, "base64") does.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode mirrors Node's Buffer.from(data, "base64"): it accepts the standard and URL-safe alphabets, skips every other character (whitespace included), stops at the first '=', and decodes a trailing partial quantum of two or three characters to one or two bytes. Node's legacy decoder reads the low byte of each UTF-16 code unit of a two-byte string, so U+0141 reads as 'A' and a character outside the BMP, whose surrogate pair ends in 0x3D or lower bytes of its own, can read as '='. The result is never nil.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.