@mxjp/binary 1.0.0 → 1.0.1

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.
package/dist/base64.d.ts CHANGED
@@ -26,7 +26,7 @@ export declare function base64UrlEncode(bytes: Bytes, padding?: boolean): string
26
26
  *
27
27
  * @param value The text to decode.
28
28
  */
29
- export declare function base64Decode(value: string): Uint8Array;
29
+ export declare function base64Decode(value: string): Uint8Array<ArrayBuffer>;
30
30
  /**
31
31
  * Decode a base64 url encoded text with optional trailing padding.
32
32
  *
@@ -36,4 +36,4 @@ export declare function base64Decode(value: string): Uint8Array;
36
36
  *
37
37
  * @param value The text to decode.
38
38
  */
39
- export declare function base64UrlDecode(value: string): Uint8Array;
39
+ export declare function base64UrlDecode(value: string): Uint8Array<ArrayBuffer>;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "MIT",
9
9
  "type": "module",
10
- "version": "1.0.0",
10
+ "version": "1.0.1",
11
11
  "main": "./dist/index.js",
12
12
  "exports": {
13
13
  ".": "./dist/index.js"
package/src/base64.ts CHANGED
@@ -45,7 +45,7 @@ function encode(bytes: Uint8Array<ArrayBuffer>, map: Uint8Array<ArrayBuffer>, pa
45
45
  return value;
46
46
  }
47
47
 
48
- function decode(value: string, map: Uint16Array): Uint8Array {
48
+ function decode(value: string, map: Uint16Array): Uint8Array<ArrayBuffer> {
49
49
  if (typeof value !== "string") {
50
50
  throw new TypeError();
51
51
  }
@@ -128,7 +128,7 @@ export function base64UrlEncode(bytes: Bytes, padding = false): string {
128
128
  *
129
129
  * @param value The text to decode.
130
130
  */
131
- export function base64Decode(value: string): Uint8Array {
131
+ export function base64Decode(value: string): Uint8Array<ArrayBuffer> {
132
132
  return decode(value, ASCII_TO_BASE64);
133
133
  }
134
134
 
@@ -141,6 +141,6 @@ export function base64Decode(value: string): Uint8Array {
141
141
  *
142
142
  * @param value The text to decode.
143
143
  */
144
- export function base64UrlDecode(value: string): Uint8Array {
144
+ export function base64UrlDecode(value: string): Uint8Array<ArrayBuffer> {
145
145
  return decode(value, ASCII_TO_BASE64URL);
146
146
  }