-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
125 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.vscode | ||
.nyc_output | ||
coverage | ||
coverage | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: node_js | ||
sudo: false | ||
node_js: | ||
- "6" | ||
- "7" | ||
- "8" | ||
- "9" | ||
- "10" | ||
- "11" | ||
- "12" | ||
before_script: | ||
|
||
script: npm run test-cov | ||
# Run test script, depending on istanbul install | ||
# - "test -n $(npm -ps ls istanbul) || npm test" | ||
# - "test -z $(npm -ps ls istanbul) || npm run-script test-travis" | ||
|
||
after_script: | ||
- "npm install coveralls && nyc report --reporter=text-lcov | coveralls" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
declare const BASE64_TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | ||
declare const PAD = "="; | ||
/** | ||
* 创建Base64编码函数 | ||
* | ||
* @param {Function} strEncode // 字符串编函数 | ||
* @returns {(input: any) => string} | ||
*/ | ||
declare function createEncode(strEncode: Function): (input: any) => string; | ||
/** | ||
* 创建Base64编码函数 | ||
* | ||
* @param {(string[] | string)} Base64 的编码表 | ||
* @param {string} PAD | ||
* @param {Function} strEncode | ||
* @param {string} PAD //填充符 | ||
* @param {Function} strEncode // 字符串编函数, 不设置则不支持编码字符串 | ||
* @returns {(input: any) => string} | ||
*/ | ||
declare function createEncode(table: string[] | string, pad: string, strEncode?: Function): (input: any) => string; | ||
declare function createEncode(table?: string[] | string, pad?: string, strEncode?: Function): (input: any) => string; | ||
/** | ||
* 创建Base64解码函数 | ||
* | ||
* @param {Function} strDecode | ||
* @returns {((base64str: string) => Uint8Array | number[])} | ||
*/ | ||
declare function createDecode(strDecode: Function): (base64str: string) => Uint8Array | number[]; | ||
/** | ||
* 创建Base64解码函数 | ||
* | ||
* @param {(string[] | string)} table | ||
* @param {string} pad | ||
* @param {(string[] | string)} [table] | ||
* @param {string} [pad] | ||
* @param {Function} [strDecode] | ||
* @returns | ||
* @returns {((base64str: string) => Uint8Array | number[])} | ||
*/ | ||
declare function createDecode(table: string[] | string, pad: string, strDecode?: Function): (base64Str: string) => number[] | Uint8Array; | ||
declare function createDecode(table?: string[] | string, pad?: string, strDecode?: Function): (base64str: string) => Uint8Array | number[]; | ||
export { createEncode, createDecode, BASE64_TABLE, PAD }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters