foundation-utils.encodetobase64withprefix
Home > @genesislcap/foundation-utils > encodeToBase64WithPrefix
encodeToBase64WithPrefix() function
Encodes the given value with a prefix to base64.
Signature:
encodeToBase64WithPrefix: (value: string | ArrayBuffer) => string
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
value |
string | ArrayBuffer |
The value to encode to base64. |
Returns:
string
The base64 encoded value with a prefix.
Remarks
Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.