Represents input bytes as either a string, Buffer or ArrayBuffer.
If data is a string - assumed encoding depends on the method the input is being
passed to.
If data is Buffer, it is used as is, without copying.
If data is ArrayBuffer, the view of the ArrayBuffer will be created without copying the
underlying memory.
Object literals
Const encoding
encoding:object
String decoding utilities.
base64ToBytes
base64ToBytes(str: string): Buffer
Decodes the base64-encoded string and returns Buffer.
Represents input bytes as either a string, Buffer or ArrayBuffer. If data is a string - assumed encoding depends on the method the input is being passed to.
If data is Buffer, it is used as is, without copying.
If data is ArrayBuffer, the view of the ArrayBuffer will be created without copying the underlying memory.