js-base64
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -31,3 +31,3 @@ | ||
*/ | ||
const version = '3.1.1'; | ||
const version = '3.1.2'; | ||
const _b64chars | ||
@@ -65,3 +65,3 @@ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | ||
/** | ||
* 100% compatibile with `window.btoa` of web browsers | ||
* 100% compatible with `window.btoa` of web browsers | ||
* @param {String} src binary string | ||
@@ -124,3 +124,3 @@ * @returns {String} Base64-encoded string | ||
/** | ||
* 100% compatibile with `window.atob` of web browsers | ||
* 100% compatible with `window.atob` of web browsers | ||
* @param {String} src Base64-encoded string | ||
@@ -127,0 +127,0 @@ * @returns {String} binary string |
{ | ||
"name": "js-base64", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Yet another Base64 transcoder in pure-JS", | ||
"main": "base64.js", | ||
"module": "base64.mjs", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"browser": "base64-es5.js", | ||
"files": [ | ||
"base64.js", | ||
"base64.mjs", | ||
"base64-es5.js" | ||
], | ||
"scripts": { | ||
"makecjs": "util/makecjs > base64.js", | ||
"test": "npm run makecjs && mocha --require @babel/register", | ||
"transpile": "babel base64.js -o base64-es5.js" | ||
"transpile": "babel base64.js -o base64-es5.js", | ||
"prepublishOnly": "npm run makecjs && npm run transpile" | ||
}, | ||
@@ -22,6 +26,3 @@ "devDependencies": { | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/dankogai/js-base64.git" | ||
}, | ||
"repository": "git+https://github.com/dankogai/js-base64.git", | ||
"keywords": [ | ||
@@ -28,0 +29,0 @@ "base64", |
@@ -11,5 +11,6 @@ [![build status](https://secure.travis-ci.org/dankogai/js-base64.png)](http://travis-ci.org/dankogai/js-base64) | ||
The hardest part of maintaing this module was not Base64 features, but cross-platform support (eg. nodejs vs web browsers). By making ES2015 mandatory virtually all codes are common (except `atob()` and `btoa()`). | ||
The hardest part of maintaining this module was not Base64 features, but cross-platform support (eg. nodejs vs web browsers). By making ES2015 mandatory virtually all codes are common (except `atob()` and `btoa()`). | ||
If you need to support legacy browsers like IE, use version 2 or transpile. | ||
## Usage | ||
@@ -48,3 +49,3 @@ | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/js-base64@3.1.1/base64.min.js"> | ||
<script src="https://cdn.jsdelivr.net/npm/js-base64@3.1.2/base64.min.js"> | ||
``` | ||
@@ -71,3 +72,3 @@ | ||
// note jsdelivr.net does not automatically minify .mjs | ||
import { Base64 } from 'https://cdn.jsdelivr.net/npm/js-base64@3.1.1/base64.mjs'; | ||
import { Base64 } from 'https://cdn.jsdelivr.net/npm/js-base64@3.1.2/base64.mjs'; | ||
</script> | ||
@@ -74,0 +75,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
155
29635
6
674
1