mifo

0.0.2 • Public • Published

mifo

Micro formats encoder and decoder.

total downloads of mifo mifo's License latest version of mifo

If links in this document not avaiable, please access README on GitHub directly.

Description

In this package, we defined some self-describing text formats.

Table of Contents

Get Started

const mifo = require('mifo');
 
// Encode the string into base64 format with self-describing heading.
mifo.base64.encode('青青子衿');
// RETURN: Base64006Z2S6Z2S5a2Q6KG
¡ 
mifo.base64.decode('Base64006Z2S6Z2S5a2Q6KG');
// RETURN: 青青子衿

API

  • string | null mifo.decode(string code)
    Automatically judge the micro-format of code and decode it with corresponding method.

mifo offers two methods for each micro format:

  • string mifo.<formatName>.encode(string text)
  • string | null mifo.<formatName>.decode(string code)

Micro Formats

base64

  • string mifo.base64.encode(string text)
  • string | null mifo.base64.decode(string code)

urlencode

  • string mifo.urlencode.encode(string text)
  • string | null mifo.urlencode.decode(string code)

Links

Package Sidebar

Install

npm i mifo

Weekly Downloads

762

Version

0.0.2

License

none

Unpacked Size

5.61 kB

Total Files

8

Last publish

Collaborators

  • youngoat