Skip to content

Commit 9a4e238

Browse files
committed
Upgrade dependencies.
1 parent 58c90e3 commit 9a4e238

File tree

5 files changed

+22
-25
lines changed

5 files changed

+22
-25
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
# Changes Logs
2+
3+
## v1.0.1
4+
5+
- Upgrade dependencies `@litert/core`, to use standalone error-hub.

LICENSE

-10
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,3 @@ incurred by, or claims asserted against, such Contributor by reason of your
165165
accepting any such warranty or additional liability.
166166

167167
END OF TERMS AND CONDITIONS
168-
169-
APPENDIX: How to apply the Apache License to your work
170-
171-
To apply the Apache License to your work, attach the following boilerplate
172-
notice, with the fields enclosed by brackets "{}" replaced with your own
173-
identifying information. (Don't include the brackets!) The text should be
174-
enclosed in the appropriate comment syntax for the file format. We also
175-
recommend that a file or class name and description of purpose be included on
176-
the same "printed page" as the copyright notice for easier identification within
177-
third-party archives.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ Following types of encodings are supported:
1111
Name | Description | Output
1212
-------------|--------------------------------------------|---------
1313
`base64` | The standard BASE64 encoding string. | string
14-
`base64url` | The URL-safe BASE64 encoding string. | string
14+
`base64url` | The URL-safe BASE64 encoding string. | string
1515
`buffer` | Node.js Buffer. | Buffer
1616
`hex` | The hexadecimal encoding string. | string
1717
`utf8` | The UTF-8 encoding string. | string
18-
`uri` | The URL-safe encoding string. | string
19-
`strict_uri` | The extended URL-safe encoding string. | string
18+
`uri` | The URL-safe encoding string. | string
19+
`strict_uri` | The extended URL-safe encoding string. | string
2020

2121
> - Encoding `strict_uri` is based on `uri`, but all special chars including
2222
> `"-"`, `"."`, `"_"`, `"!"`, `"*"`, `"("`, `")"`, `"~"`, `"'"`
2323
> will be escaped.
2424
>
25-
> > NOTE: The data of `strict_uri` encoding, could be simply decoded by function
26-
> > `decodeURIComponent`.
25+
> > NOTE: The data of `strict_uri` encoding, could be simply decoded by
26+
> > function `decodeURIComponent`.
2727
>
2828
> - Encoding `base64url` is based on `base64`, while charactor
2929
> `"="`, `"+"`, `"/"`

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@litert/encodings",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "The buffer-based encoding utility method for node.js.",
55
"main": "lib/index.js",
66
"scripts": {
@@ -34,6 +34,6 @@
3434
"typescript": "^3.1.6"
3535
},
3636
"dependencies": {
37-
"@litert/core": "^1.0.1"
37+
"@litert/core": "^1.0.2"
3838
}
3939
}

src/lib/index.ts

+11-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717
import * as Core from "@litert/core";
1818

19-
const Errors = Core.getDefaultErrorHub();
19+
/**
20+
* The error hub of encodings module.
21+
*/
22+
export const Errors = Core.createErrorHub("@litert/encodings");
2023

2124
/**
2225
* E_INVALID_ENCODING
@@ -61,11 +64,11 @@ export function getEncodings(): Encodings[] {
6164
}
6265

6366
/**
64-
* Convert a string from BASE64 to BASE64-URL-Escaped encoding.
67+
* Convert a string from BASE64 to BASE64-URL-Safe encoding.
6568
*
6669
* @param {string} base64 The BASE64 encoding string to be converted.
6770
*
68-
* @returns {string} returns the BASE64-URL-Escaped encoding result of input.
71+
* @returns {string} returns the BASE64-URL-Safe encoding result of input.
6972
*/
7073
export function base64UrlEncode(base64: string): string {
7174

@@ -76,16 +79,16 @@ export function base64UrlEncode(base64: string): string {
7679
}
7780

7881
/**
79-
* Convert a string to Strict-URL-Escaped encoding.
82+
* Convert a string to Strict-URL-Safe encoding.
8083
*
8184
* > All special chars including `-`, `.`, `_`, `!`, `*`, `(`, `)`, `~`, `'`
8285
* > will be escaped.
8386
*
84-
* NOTE: Decode the Strict-URL-Escaped encoding string by `decodeURIComponent`.
87+
* NOTE: Decode the Strict-URL-Safe encoding string by `decodeURIComponent`.
8588
*
8689
* @param {string} text The string to be converted.
8790
*
88-
* @returns {string} returns the Strict-URL-Escaped encoding result of input.
91+
* @returns {string} returns the Strict-URL-Safe encoding result of input.
8992
*/
9093
export function encodeURIStrictly(text: string): string {
9194

@@ -100,9 +103,9 @@ function _encodeURIStrictly(text: string): string {
100103
}
101104

102105
/**
103-
* Convert a string from BASE64-URL-Escaped encoding to BASE64.
106+
* Convert a string from BASE64-URL-Safe encoding to BASE64.
104107
*
105-
* @param {string} base64 The BASE64-URL-Escaped encoding string to be converted.
108+
* @param {string} base64 The BASE64-URL-Safe encoding string to be converted.
106109
*
107110
* @returns {string} returns the BASE64 encoding result of input.
108111
*/

0 commit comments

Comments
 (0)