forked from github/cordova-android

This reverts commit 5a5f544a4890ff65519329303e75a649e482df23. Rationale: base64-js update in 5a5f544 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 time 5a5f544 was committed. The base64-js update in 5a5f544 is now deemed as not wanted due to the extra base64-js version that would need to be committed. The other dependencies updates in 5a5f544 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 neither 5a5f544 nor this revert will show up in the master branch.
33 lines
1005 B
Markdown
33 lines
1005 B
Markdown
base64-js
|
|
=========
|
|
|
|
`base64-js` does basic base64 encoding/decoding in pure JS.
|
|
|
|
[](http://travis-ci.org/beatgammit/base64-js)
|
|
|
|
[](https://ci.testling.com/beatgammit/base64-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](https://npmjs.org) 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 array
|
|
* `toByteArray` - Takes a base64 string and returns a byte array
|
|
* `fromByteArray` - Takes a byte array and returns a base64 string
|
|
|
|
## license
|
|
|
|
MIT
|