base64-js-tools
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

base64-js-tools

NPM Version

Encode/Decode base64 from byte array or text

Demo

Online Base64 Encode File Or Image

Online Base64 Encode/Decode Text

With npm

Install

$ npm install --save base64-js-tools

Import

import { Base64 } from "base64-js-tools";

or

const { Base64 } = require("base64-js-tools");

In web browsers

<script src="base64.min.js"></script>

or

<script src="https://cdn.jsdelivr.net/npm/base64-js-tools@1.0.2/lib/base64.min.js"></script>

Usage

Encode

Base64.encodeByteArray([208, 176, 121, 55, 56, 42, 38, 54]);    //  0LB5NzgqJjY=
Base64.encodeText("dew^&5654");                                 //  ZGV3XiY1NjU0

Decode

Base64.decodeToByteArray("0LB5NzgqJjY=");   //  [208, 176, 121, 55, 56, 42, 38, 54]
Base64.decodeToText("ZGV3XiY1NjU0");        //  dew^&5654

Readme

Keywords

Package Sidebar

Install

npm i base64-js-tools

Weekly Downloads

0

Version

1.0.2

License

GPL-3.0

Unpacked Size

46.8 kB

Total Files

10

Last publish

Collaborators

  • simetrio