Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

js-base64

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-base64 - npm Package Compare versions

Comparing version
3.7.6
to
3.7.7
+2
-2
base64.d.mts

@@ -12,7 +12,7 @@ /**

*/
declare const version = "3.7.6";
declare const version = "3.7.7";
/**
* @deprecated use lowercase `version`.
*/
declare const VERSION = "3.7.6";
declare const VERSION = "3.7.7";
/**

@@ -19,0 +19,0 @@ * polyfill version of `btoa`

@@ -12,7 +12,7 @@ /**

*/
declare const version = "3.7.6";
declare const version = "3.7.7";
/**
* @deprecated use lowercase `version`.
*/
declare const VERSION = "3.7.6";
declare const VERSION = "3.7.7";
/**

@@ -19,0 +19,0 @@ * polyfill version of `btoa`

@@ -40,3 +40,3 @@ //

*/
var version = '3.7.6';
var version = '3.7.7';
/**

@@ -46,4 +46,2 @@ * @deprecated use lowercase `version`.

var VERSION = version;
var _hasatob = typeof atob === 'function';
var _hasbtoa = typeof btoa === 'function';
var _hasBuffer = typeof Buffer === 'function';

@@ -92,3 +90,3 @@ var _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;

*/
var _btoa = _hasbtoa ? function (bin) { return btoa(bin); }
var _btoa = typeof btoa === 'function' ? function (bin) { return btoa(bin); }
: _hasBuffer ? function (bin) { return Buffer.from(bin, 'binary').toString('base64'); }

@@ -222,3 +220,3 @@ : btoaPolyfill;

*/
var _atob = _hasatob ? function (asc) { return atob(_tidyB64(asc)); }
var _atob = typeof atob === 'function' ? function (asc) { return atob(_tidyB64(asc)); }
: _hasBuffer ? function (asc) { return Buffer.from(asc, 'base64').toString('binary'); }

@@ -225,0 +223,0 @@ : atobPolyfill;

@@ -12,3 +12,3 @@ /**

*/
const version = '3.7.6';
const version = '3.7.7';
/**

@@ -18,4 +18,2 @@ * @deprecated use lowercase `version`.

const VERSION = version;
const _hasatob = typeof atob === 'function';
const _hasbtoa = typeof btoa === 'function';
const _hasBuffer = typeof Buffer === 'function';

@@ -64,3 +62,3 @@ const _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;

*/
const _btoa = _hasbtoa ? (bin) => btoa(bin)
const _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)
: _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')

@@ -188,3 +186,3 @@ : btoaPolyfill;

*/
const _atob = _hasatob ? (asc) => atob(_tidyB64(asc))
const _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))
: _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')

@@ -191,0 +189,0 @@ : atobPolyfill;

{
"name": "js-base64",
"version": "3.7.6",
"version": "3.7.7",
"description": "Yet another Base64 transcoder in pure-JS",

@@ -5,0 +5,0 @@ "main": "base64.js",

@@ -28,3 +28,3 @@ [![CI via GitHub Actions](https://github.com/dankogai/js-base64/actions/workflows/node.js.yml/badge.svg)](https://github.com/dankogai/js-base64/actions/workflows/node.js.yml)

```html
<script src="https://cdn.jsdelivr.net/npm/js-base64@3.7.6/base64.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-base64@3.7.7/base64.min.js"></script>
```

@@ -52,3 +52,3 @@

// note jsdelivr.net does not automatically minify .mjs
import { Base64 } from 'https://cdn.jsdelivr.net/npm/js-base64@3.7.6/base64.mjs';
import { Base64 } from 'https://cdn.jsdelivr.net/npm/js-base64@3.7.7/base64.mjs';
</script>

@@ -60,3 +60,3 @@ ```

// or if you prefer no Base64 namespace
import { encode, decode } from 'https://cdn.jsdelivr.net/npm/js-base64@3.7.6/base64.mjs';
import { encode, decode } from 'https://cdn.jsdelivr.net/npm/js-base64@3.7.7/base64.mjs';
</script>

@@ -63,0 +63,0 @@ ```