@mainframe/utils-base64
Base64 encoding utilities
Last updated 2 years ago by paul_lecam .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mainframe/utils-base64 
SYNC missed versions from official npm registry.

utils-base64

Utilities for base64-encoded strings.

Installation

yarn add @mainframe/utils-base64

Usage

import { encodeBase64, decodeBase64 } from 'utils-base64'

const buffer = Buffer.from('test')
const encoded = encodeBase64(buffer) // base64 (string)
const decoded = decodeBase64(encoded) // Buffer

Types

base64

Opaque type representing a base64-encoded string.

API

base64Type()

Simple identity function casting the provided value as base64 to properly type-check.

Arguments

  1. value: any

Returns base64

encodeBase64()

Arguments

  1. input: Buffer

Returns base64

decodeBase64()

Arguments

  1. input: base64

Returns Buffer

License

MIT

Current Tags

  • 0.1.1                                ...           latest (2 years ago)

2 Versions

  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |