mifo

Micro formats encoder and decoder.

  • mifo

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
mifo
000.0.25 years ago5 years agoMinified + gzip package size for mifo in KB

Readme

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

* [base64](#base64)
* [urlencode](#urlencode)

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.\.encode(string text)
  • string | null mifo.\.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