hono 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,8 +25,15 @@ const auth = (req) => {
25
25
  return { username: userPass[1], password: userPass[2] };
26
26
  };
27
27
  function decodeBase64(str) {
28
- if (atob && btoa) {
29
- return atob(str);
28
+ if (atob) {
29
+ const text = atob(str);
30
+ const length = text.length;
31
+ const bytes = new Uint8Array(length);
32
+ for (let i = 0; i < length; i++) {
33
+ bytes[i] = text.charCodeAt(i);
34
+ }
35
+ const decoder = new TextDecoder();
36
+ return decoder.decode(bytes);
30
37
  }
31
38
  else {
32
39
  const { Buffer } = require('buffer');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "[炎] Ultrafast web framework for Cloudflare Workers.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",