UNPKG
bond-wm
Version:
latest (0.8.0)
0.8.0
0.7.0
0.6.1
0.6.0
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3.2
0.3.1
0.3.0
An X Window Manager built on web technologies.
github.com/wnayes/bond-wm
wnayes/bond-wm
bond-wm
/
base64.ts
10 lines
(7 loc)
•
277 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ base64 }
from
"rfc4648"
;
export
function
encodeArrayBufferToBase64
(
buffer: ArrayBufferLike
): string {
return
base64.
stringify
(
new
Uint8Array
(buffer)); }
export
function
decodeBase64ToArrayBuffer
(
str: string
):
ArrayBufferLike
{
return
base64.
parse
(str).
buffer
; }