aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/util
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-07-31 13:57:17 -0700
committerGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-07-31 13:57:17 -0700
commit90991da908b0725802db63d9fd8d5b4de1eb21a5 (patch)
treebb1e71bce28124e63944b0a47722ed925aa35687 /docs/guides/util
parent404b90badc5856a74c06d04062c850003e28fed5 (diff)
downloadbun-90991da908b0725802db63d9fd8d5b4de1eb21a5.tar.gz
bun-90991da908b0725802db63d9fd8d5b4de1eb21a5.tar.zst
bun-90991da908b0725802db63d9fd8d5b4de1eb21a5.zip
Update titles, add Workspaces guide
Diffstat (limited to 'docs/guides/util')
-rw-r--r--docs/guides/util/base64.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/guides/util/base64.md b/docs/guides/util/base64.md
new file mode 100644
index 000000000..06003f062
--- /dev/null
+++ b/docs/guides/util/base64.md
@@ -0,0 +1,15 @@
+---
+name: Encode and decode base64 strings
+---
+
+Bun implements the Web-standard [`atob`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/atob) and [`btoa`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/btoa) functions for encoding and decoding base64 strings.
+
+```ts
+const data = "hello world";
+const encoded = btoa(data); // => "aGVsbG8gd29ybGQ="
+const decoded = atob(encoded); // => "hello world"
+```
+
+---
+
+See [Docs > API > Hashing](/docs/api/hashing#bun-password) for complete documentation.