Skip to content

Commit 03d72c8

Browse files
committed
docs: update base64url function descriptions
1 parent d18f7f8 commit 03d72c8

File tree

3 files changed

+5
-21
lines changed

3 files changed

+5
-21
lines changed

docs/util/base64url/functions/decode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Support from the community to continue maintaining and improving this module is
66

77
**decode**(`input`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)
88

9+
Decodes a Base64URL encoded input.
10+
911
## Parameters
1012

1113
| Parameter | Type |

docs/util/base64url/functions/encode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Support from the community to continue maintaining and improving this module is
66

77
**encode**(`input`): `string`
88

9+
Encodes an input using Base64URL with no padding.
10+
911
## Parameters
1012

1113
| Parameter | Type |

src/util/base64url.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,4 @@
44
* @module
55
*/
66

7-
import * as base64url from '../lib/base64url.js'
8-
9-
/**
10-
* Utility function to encode a string or {@link !Uint8Array} as a base64url string.
11-
*
12-
* @param input Value that will be base64url-encoded.
13-
*/
14-
interface Base64UrlEncode {
15-
(input: Uint8Array | string): string
16-
}
17-
/**
18-
* Utility function to decode a base64url encoded string.
19-
*
20-
* @param input Value that will be base64url-decoded.
21-
*/
22-
interface Base64UrlDecode {
23-
(input: Uint8Array | string): Uint8Array
24-
}
25-
26-
export const encode: Base64UrlEncode = base64url.encode
27-
export const decode: Base64UrlDecode = base64url.decode
7+
export { encode, decode } from '../lib/base64url.js'

0 commit comments

Comments
 (0)