GithubHelp home page GithubHelp logo

blockafrik / base64-arraybuffer Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 26 KB

Javascript module for converting base-64 to arraybuffer and from arraybuffer to base-64

License: Apache License 2.0

JavaScript 100.00%

base64-arraybuffer's Introduction

base64-arraybuffer

Javascript module for converting base-64 to arraybuffer and from arraybuffer to base-64

Install

$ npm install base64-arraybuffer

Usage

var base64_arraybuffe r= require('base64-arraybuffer');

####Converting  ArrayBuffer to base_64

var uint8 = new Uint8Array ([ 73, 32, 108, 111, 118, 101, 32, 65, 102, 114, 105, 99, 97 ])
var base64_value = base64_arraybuffer.ab_2_base64(uint8)
//=> SSBsb3ZlIEFmcmljYQ==


####Converting Base_64 to Arraybuffer

arrayBuffer = base64_arraybuffer.base64_2_ab(base64_value)
//=> Uint8Array [ 73, 32, 108, 111, 118, 101, 32, 65, 102, 114, 105, 99, 97 ]

Related

License

MIT © Andrews Agyemang Opoku

base64-arraybuffer's People

Contributors

blockafrik avatar andrewsopoku avatar

Watchers

James Cloos avatar

Forkers

firstor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.