Closed Itaypa closed 8 months ago
Thank you!
I was a little puzzled with:
--- a/base64.js
+++ b/base64.js
@@ -42,8 +42,8 @@
* @deprecated use lowercase `version`.
*/
var VERSION = version;
- var _hasatob = typeof atob === 'function';
- var _hasbtoa = typeof btoa === 'function';
+ var typeof atob === 'function' = typeof atob === 'function';
+ var typeof btoa === 'function' = typeof btoa === 'function';
var _hasBuffer = typeof Buffer === 'function';
var _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined
But It was gone after npm test
which rebuilds .js and .mjs from *.ts.
Hi,
Awesome library, I use it in all my projects.
recently I used this library in a web app that launches a web worker, the issue occurred when _hasatob is calculated when app is loaded on the main thread (while atob) exists and when running the web worker it mistakenly fails because it does not exist.
by not caching the result it solves the issue