mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
84cb08b23e
This reverts commit5a5f544a48
. Rationale: base64-js update in5a5f544
causes extra base64-js version to be installed under plist (node_modules/plist/node_modules/base64-js), which would need to be committed to satisfy the needs of the deprecated Node.js 4 version. The extra base64-js version in node_modules/plist/node_modules/base64-js was missed at the time5a5f544
was committed. The base64-js update in5a5f544
is now deemed as not wanted due to the extra base64-js version that would need to be committed. The other dependencies updates in5a5f544
may be nice to have but not considered necessary for the patch release. Reverting now to unblock the upcoming 7.1.4 patch release. Note that neither5a5f544
nor this revert will show up in the master branch.
1005 B
1005 B
base64-js
base64-js
does basic base64 encoding/decoding in pure JS.
Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
install
With npm do:
npm install base64-js
methods
var base64 = require('base64-js')
base64
has three exposed functions, byteLength
, toByteArray
and fromByteArray
, which both take a single argument.
byteLength
- Takes a base64 string and returns length of byte arraytoByteArray
- Takes a base64 string and returns a byte arrayfromByteArray
- Takes a byte array and returns a base64 string
license
MIT