Socket
Socket
Sign inDemoInstall

couch64

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    couch64

Decode and encode Base64


Version published
Weekly downloads
53
increased by12.77%
Maintainers
1
Install size
9.02 kB
Created
Weekly downloads
 

Readme

Source

couch64

Handle base64 encoding and decoding inside CouchDB (and node) using typed arrays.

Build Status

The code comes from Mozilla:

/*\
|*|
|*|  Base64 / binary data / UTF-8 strings utilities
|*|
|*|  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding
|*|
\*/

Usage:

var couch64 = require('couch64')

var sMyInput = "Base 64 \u2014 Mozilla Developer Network"

var aMyUTF8Input = couch64.strToUTF8Arr(sMyInput)
var sMyBase64 = couch64.base64EncArr(aMyUTF8Input)
log(sMyBase64)

var aMyUTF8Output = couch64.base64DecToArr(sMyBase64)
var sMyOutput = couch64.UTF8ArrToStr(aMyUTF8Output)
log(sMyOutput)

API

base64EncArr(aBytes)

Array of bytes to base64 string decoding

base64DecToArr(sBase64, nBlocksSize)

Base64 string to UTF-8 array encoding

UTF8ArrToStr(aBytes)

UTF-8 array to DOMString

strToUTF8Arr(sDOMStr)

DOMString to UTF-8 array

License

By Mozilla Contributors is licensed under CC-BY-SA 2.5

(c) 2014 Johannes J. Schmidt

FAQs

Last updated on 19 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc