@alttiri/base85
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -8,3 +8,3 @@ const ascii85 = charsetToMap(`!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstu`); | ||
/** @param {"ascii85"|"z85"|String} [charset="z85"] | ||
/** @param {"ascii85" | "z85" | string} [charset="z85"] | ||
* @return {Uint8Array} */ | ||
@@ -19,3 +19,3 @@ function getMap(charset = "z85") { | ||
/** @param {String} charset - 85 characters ASCII string */ | ||
/** @param {string} charset - 85 characters ASCII string */ | ||
function charsetToMap(charset) { | ||
@@ -41,4 +41,4 @@ const ui8a = new Uint8Array(85); | ||
* @param {Uint8Array} ui8a | ||
* @param {"ascii85"|"z85"|String} [charset="z85"] | ||
* @return {String} | ||
* @param {"ascii85" | "z85" | string} [charset="z85"] | ||
* @return {string} | ||
* */ | ||
@@ -83,4 +83,4 @@ export function encode(ui8a, charset) { | ||
* Decodes Base85 string. | ||
* @param {String} base85 | ||
* @param {"ascii85"|"z85"|String} [charset="z85"] | ||
* @param {string} base85 | ||
* @param {"ascii85" | "z85" | string} [charset="z85"] | ||
* @return {Uint8Array} | ||
@@ -87,0 +87,0 @@ * */ |
{ | ||
"name": "@alttiri/base85", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Pretty fast base85 JavaScript library", | ||
@@ -9,2 +9,3 @@ "author": "alttiri", | ||
"main": "base85.js", | ||
"types": "base85.d.ts", | ||
"keywords": [ | ||
@@ -27,3 +28,3 @@ "base85", | ||
"#": "", | ||
"unpublish-npm": "npm unpublish @alttiri/base85@1.2.3 --registry=https://registry.npmjs.org", | ||
"unpublish-npm": "npm unpublish @alttiri/base85@1.4.3 --registry=https://registry.npmjs.org", | ||
"##": "", | ||
@@ -30,0 +31,0 @@ "login-npm": "npm login --registry=https://registry.npmjs.org", |
# base85 | ||
[Pretty fast](https://github.com/AlttiRi/base85/blob/7a6edf4b9c0b16e0d63e35c0c102c1875f78ddb0/tests/test-2-speed.js#L23-L52) base85 JavaScript library. | ||
[Pretty fast](https://github.com/AlttiRi/base85/blob/7a6edf4b9c0b16e0d63e35c0c102c1875f78ddb0/tests/test-2-speed.js#L23-L52) base85 JavaScript library (with TS support). | ||
Aimed to encoding binary data (`Uint8Array`). | ||
It is designed to encode binary data (`Uint8Array`) into a "base85" text string. | ||
@@ -9,7 +9,7 @@ | ||
#### `function encode(ui8a: Uint8Array, charset?: "ascii85" | "z85" | String) : String` | ||
#### `function encode(ui8a: Uint8Array, charset?: "ascii85" | "z85" | string) : string` | ||
[`encode`](https://github.com/AlttiRi/base85/blob/42343e624f27ec68aa936a274c297ccd6c15c8cb/index.js#L42) encodes the input `Uint8Array` into base85 `String`. | ||
#### `function decode(base85: String, charset?: "ascii85" | "z85" | String) : Uint8Array` | ||
#### `function decode(base85: string, charset?: "ascii85" | "z85" | string) : Uint8Array` | ||
@@ -16,0 +16,0 @@ [`decode`](https://github.com/AlttiRi/base85/blob/42343e624f27ec68aa936a274c297ccd6c15c8cb/index.js#L84) decodes the input base85 `String` into `Uint8Array`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22473
10
349