地址
https://github.com/dankogai/js-base64
In Browser
Locally…
<script src="base64.js"></script>
… or Directly from CDN. In which case you don't even need to install.
<script src="https://cdn.jsdelivr.net/npm/js-base64@3.7.2/base64.min.js"></script>
This good old way loads Base64 in the global context (window). Though Base64.noConflict() is made available, you should consider using ES6 Module to avoid tainting window.
As an ES6 Module
locally…
import { Base64 } from 'js-base64';
// or if you prefer no Base64 namespaceimport { encode, decode } from 'js-base64';