source: trip-planner-front/node_modules/base64-js/README.md@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1base64-js
2=========
3
4`base64-js` does basic base64 encoding/decoding in pure JS.
5
6[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js)
7
8Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
9
10Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
11
12## install
13
14With [npm](https://npmjs.org) do:
15
16`npm install base64-js` and `var base64js = require('base64-js')`
17
18For use in web browsers do:
19
20`<script src="base64js.min.js"></script>`
21
22[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme)
23
24## methods
25
26`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
27
28* `byteLength` - Takes a base64 string and returns length of byte array
29* `toByteArray` - Takes a base64 string and returns a byte array
30* `fromByteArray` - Takes a byte array and returns a base64 string
31
32## license
33
34MIT
Note: See TracBrowser for help on using the repository browser.