Skip to main content

foundation-utils.decodefrombase64withprefix

Home > @genesislcap/foundation-utils > decodeFromBase64WithPrefix

decodeFromBase64WithPrefix() function​

Decodes a value from base64 with a prefix.

Signature:

decodeFromBase64WithPrefix: (value: string) => string | ArrayBuffer

Parameters​

Parameter

Type

Description

value

string

The value to decode from base64.

Returns:

string | ArrayBuffer

The decoded value.

Remarks​

Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.