# nv-facutil-eb64

> nv-facutil-eb64 =============== - nv-facutil-eb64 is a simple wrap of https://www.npmjs.com/package/base64-js - the only difference is its CODES and PADDING is configurable

Latest version **1.0.0** (published 2022-04-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-facutil-eb64
pnpm add nv-facutil-eb64
yarn add nv-facutil-eb64
bun add nv-facutil-eb64
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-04-14 |
| First published | 2022-04-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |

## Links

- npm: https://www.npmjs.com/package/nv-facutil-eb64
- npm.io page: https://npm.io/package/nv-facutil-eb64

## Recent versions

- 1.0.0 (latest) — 2022-04-14

## README

nv-facutil-eb64
===============
- nv-facutil-eb64  is a simple wrap of https://www.npmjs.com/package/base64-js
- the only difference is its CODES and PADDING is configurable

### DEFAULT PADDING

    '等'     the original of base64 is '='

### DEFAULT CODES

    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789加杠'

    the original of base64 is 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'



install
=======
- npm install nv-facutil-eb64 

usage
=====
    
       const x = require("nv-facutil-eb64");
       x.PADDING = '等';
       x.CODES   = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789加杠'

example
-------

        > x.PADDING
        '等'
        >
        > x.CODES
        'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789加杠'
        >


        > x.utf8_to_eb64('A')
        'QQ等等'
        >
        > x.eb64_to_utf8('QQ等等')
        'A'
        >

        > x.utf8_to_eb64('𝑒')
        '8J2Rkg等等'
        > x.eb64_to_utf8('8J2Rkg等等')
        '𝑒'
        >




        > x.utf8_to_eb64('我你他')
        '5oiR5L2g5LuW'
        > x.eb64_to_utf8('5oiR5L2g5LuW')
        '我你他'
        >

        var s = '//++/++/++//';
        > x.utf8_to_eb64(s)
        'Ly8rKy8rKy8rKy8v'
        >
        > x.eb64_to_utf8('Ly8rKy8rKy8rKy8v')
        '//++/++/++//'
        >


        var s = 'SQ==QU0=';


        > x.utf8_to_eb64(s)
        'U1E9PVFVMD0等'
        >
        > x.eb64_to_utf8('U1E9PVFVMD0等')
        'SQ==QU0='
        >


        > x.eb64_to_utf8(x.utf8_to_eb64('a'))
        'a'
        > x.eb64_to_utf8(x.utf8_to_eb64('aa'))
        'aa'
        > x.eb64_to_utf8(x.utf8_to_eb64('aaa'))
        'aaa'
        > x.eb64_to_utf8(x.utf8_to_eb64('hi'))
        'hi'
        > x.eb64_to_utf8(x.utf8_to_eb64('hi!'))
        'hi!'
        > x.eb64_to_utf8(x.utf8_to_eb64('hi!!'))
        'hi!!'
        > x.eb64_to_utf8(x.utf8_to_eb64('sup'))
        'sup'
        > x.eb64_to_utf8(x.utf8_to_eb64('sup?'))
        'sup?'
        > x.eb64_to_utf8(x.utf8_to_eb64('sup?!'))
        'sup?!'
        >


API
====


###

        {
          CODE_ERRORS: {
            length_must_be_64: 'length_must_be_64',
            code_must_be_unique: 'code_must_be_unique',
            each_code_length_must_be_1: 'each_code_length_must_be_1',
            code_can_not_be_padding: 'code_can_not_be_padding'
          },
          eb64_to_u8: [Function: eb64_to_u8],
          u8_to_eb64: [Function: u8_to_eb64],
          utf8_to_eb64: [Function: utf8_to_eb64],
          eb64_to_utf8: [Function: eb64_to_utf8]
        }


###  getter/setter
- PADDING      default : '等'
- CODES        default : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789加杠'



LICENSE
=======
- ISC

---
_Source: https://npm.io/package/nv-facutil-eb64 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
