🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

js-base64

Package Overview
Dependencies
Maintainers
1
Versions
73
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.8.0
to
3.8.1
+2
-2
base64.d.mts

@@ -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`

@@ -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`

@@ -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

@@ -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

{
"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",

[![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)
[![CI on bun](https://github.com/dankogai/js-base64/actions/workflows/bun.yml/badge.svg)](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 @@ ```