h1de

优雅的方式隐藏你的敏感/隐私信息。 Hide your privacy elegantly.

Usage no npm install needed!

<script type="module">
  import h1de from 'https://cdn.skypack.dev/h1de';
</script>

README

h1de

优雅的方式隐藏你的敏感/隐私信息。 Hide your privacy elegantly.

github npm npm npm Maintainability Test Coverage Build Status

你的关注是我最大的动力。 Your Star is the best gift.

安装使用 Useage

命令行使用 In CLI

安装 Installation:

yarn add --global h1de
# or
npm install -g h1de

一次性使用:

npx h1de [command] [...params]

代码使用 In codes

yarn add h1de
# or
npm install --save h1de

Demo:

const h1de = require('h1de');

h1de.tr('willin@willin.org', 'oO_~@#.+=');
// echo Oo__o#aOo__o#@+.~ | tr O.+#_o~a@ wronlig@.

hide.base64('willin@willin.org');
// echo d2lsbGluQHdpbGxpbi5vcmc= | base64 -d

文档 API Document

tr(str[, mask_chars])

Params:

  • str: 必填 Required
  • mask_chars: 可选 Optional
    • 默认值 Default: abcdefhijkmnprstwxyz2345678
    • 重复字符会被过滤。 Ignore duplicate character.
    • 以下字符会被过滤: Ignore characters:
    • '`-

JS Demo:

const h1de = require('h1de');

h1de.tr('willin@willin.org');
// echo hkzzkjrhkzzkjf3em | tr he3jzkmrf wronlig@.

h1de.tr('willin@willin.org', 'oO_~@#.+=');
// echo ~@OO@+.~@OO@+=o#_ | tr ~#o+O@_.= wronlig@.

CLI Demo:

h1de tr willin@willin.org
# echo Oo__o#aOo__o#@+.~ | tr O.+#_o~a@ wronlig@.

base64(str)

Params:

  • str: 必填 Required

JS Demo:

const h1de = require('h1de');

h1de.base64('willin@willin.org');
// echo d2lsbGluQHdpbGxpbi5vcmc= | base64 -d

CLI Demo:

h1de base64 willin@willin.org
# echo d2lsbGluQHdpbGxpbi5vcmc= | base64 -d

License

Apache 2.0

通过支付宝捐赠:

qr