+2
-2
@@ -12,7 +12,7 @@ /** | ||
| */ | ||
| declare const version = "3.8.0"; | ||
| declare const version = "3.8.1"; | ||
| /** | ||
| * @deprecated use lowercase `version`. | ||
| */ | ||
| declare const VERSION = "3.8.0"; | ||
| declare const VERSION = "3.8.1"; | ||
| /** | ||
@@ -19,0 +19,0 @@ * polyfill version of `btoa` |
+2
-2
@@ -12,7 +12,7 @@ /** | ||
| */ | ||
| declare const version = "3.8.0"; | ||
| declare const version = "3.8.1"; | ||
| /** | ||
| * @deprecated use lowercase `version`. | ||
| */ | ||
| declare const VERSION = "3.8.0"; | ||
| declare const VERSION = "3.8.1"; | ||
| /** | ||
@@ -19,0 +19,0 @@ * polyfill version of `btoa` |
+6
-2
@@ -40,3 +40,3 @@ // | ||
| */ | ||
| var version = '3.8.0'; | ||
| var version = '3.8.1'; | ||
| /** | ||
@@ -90,3 +90,7 @@ * @deprecated use lowercase `version`. | ||
| var _btoa = typeof btoa === 'function' ? function (bin) { return btoa(bin); } | ||
| : _hasBuffer ? function (bin) { return Buffer.from(bin, 'binary').toString('base64'); } | ||
| : _hasBuffer ? function (bin) { | ||
| if (/[^\x00-\xff]/.test(bin)) | ||
| throw new TypeError('invalid character found'); | ||
| return Buffer.from(bin, 'binary').toString('base64'); | ||
| } | ||
| : btoaPolyfill; | ||
@@ -93,0 +97,0 @@ var _fromUint8Array = _hasBuffer |
+6
-2
@@ -12,3 +12,3 @@ /** | ||
| */ | ||
| const version = '3.8.0'; | ||
| const version = '3.8.1'; | ||
| /** | ||
@@ -62,3 +62,7 @@ * @deprecated use lowercase `version`. | ||
| const _btoa = typeof btoa === 'function' ? (bin) => btoa(bin) | ||
| : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64') | ||
| : _hasBuffer ? (bin) => { | ||
| if (/[^\x00-\xff]/.test(bin)) | ||
| throw new TypeError('invalid character found'); | ||
| return Buffer.from(bin, 'binary').toString('base64'); | ||
| } | ||
| : btoaPolyfill; | ||
@@ -65,0 +69,0 @@ const _fromUint8Array = _hasBuffer |
+1
-1
| { | ||
| "name": "js-base64", | ||
| "version": "3.8.0", | ||
| "version": "3.8.1", | ||
| "description": "Yet another Base64 transcoder in pure-JS", | ||
@@ -5,0 +5,0 @@ "main": "base64.js", |
+4
-3
| [](https://github.com/dankogai/js-base64/actions/workflows/node.js.yml) | ||
| [](https://github.com/dankogai/js-base64/actions/workflows/bun.yml) | ||
@@ -28,3 +29,3 @@ # base64.js | ||
| ```html | ||
| <script src="https://cdn.jsdelivr.net/npm/js-base64@3.8.0/base64.min.js"></script> | ||
| <script src="https://cdn.jsdelivr.net/npm/js-base64@3.8.1/base64.min.js"></script> | ||
| ``` | ||
@@ -52,3 +53,3 @@ | ||
| // note jsdelivr.net does not automatically minify .mjs | ||
| import { Base64 } from 'https://cdn.jsdelivr.net/npm/js-base64@3.8.0/base64.mjs'; | ||
| import { Base64 } from 'https://cdn.jsdelivr.net/npm/js-base64@3.8.1/base64.mjs'; | ||
| </script> | ||
@@ -60,3 +61,3 @@ ``` | ||
| // or if you prefer no Base64 namespace | ||
| import { encode, decode } from 'https://cdn.jsdelivr.net/npm/js-base64@3.8.0/base64.mjs'; | ||
| import { encode, decode } from 'https://cdn.jsdelivr.net/npm/js-base64@3.8.1/base64.mjs'; | ||
| </script> | ||
@@ -63,0 +64,0 @@ ``` |
39460
1.03%765
1.06%171
0.59%