Skip to content
/ h1de Public

优雅的方式隐藏你的敏感/隐私信息。 Hide your privacy elegantly. 欢迎PR各种玩法

License

Notifications You must be signed in to change notification settings

willin/h1de

Repository files navigation

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('[email protected]', 'oO_~@#.+=');
// echo Oo__o#aOo__o#@+.~ | tr O.+#_o~a@ wronlig@.

hide.base64('[email protected]');
// 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('[email protected]');
// echo hkzzkjrhkzzkjf3em | tr he3jzkmrf wronlig@.

h1de.tr('[email protected]', 'oO_~@#.+=');
// echo ~@OO@+.~@OO@+=o#_ | tr ~#o+O@_.= wronlig@.

CLI Demo:

h1de tr [email protected]
# echo Oo__o#aOo__o#@+.~ | tr O.+#_o~a@ wronlig@.

base64(str)

Params:

  • str: 必填 Required

JS Demo:

const h1de = require('h1de');

h1de.base64('[email protected]');
// echo d2lsbGluQHdpbGxpbi5vcmc= | base64 -d

CLI Demo:

h1de base64 [email protected]
# echo d2lsbGluQHdpbGxpbi5vcmc= | base64 -d

License

Apache 2.0

通过支付宝捐赠:

qr

About

优雅的方式隐藏你的敏感/隐私信息。 Hide your privacy elegantly. 欢迎PR各种玩法

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published