https://github.com/willin/h1de
优雅的方式隐藏你的敏感/隐私信息。 Hide your privacy elegantly. 欢迎PR各种玩法
https://github.com/willin/h1de
base64 encrypt hide privacy tr
Last synced: about 1 year ago
JSON representation
优雅的方式隐藏你的敏感/隐私信息。 Hide your privacy elegantly. 欢迎PR各种玩法
- Host: GitHub
- URL: https://github.com/willin/h1de
- Owner: willin
- License: apache-2.0
- Created: 2020-07-22T09:43:10.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-03T11:15:13.000Z (over 3 years ago)
- Last Synced: 2025-04-10T17:40:59.972Z (about 1 year ago)
- Topics: base64, encrypt, hide, privacy, tr
- Language: JavaScript
- Homepage:
- Size: 769 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# h1de
优雅的方式隐藏你的敏感/隐私信息。 Hide your privacy elegantly.
[](https://github.com/willin) [](https://npmjs.org/package/h1de) [](https://npmjs.org/package/h1de) [](https://npmjs.org/package/h1de) [](https://codeclimate.com/github/willin/h1de/maintainability) [](https://codeclimate.com/github/willin/h1de/test_coverage) [](https://travis-ci.org/willin/h1de)
> 你的`关注`是我最大的动力。 Your `Star` is the best gift.
## 安装使用 Useage
### 命令行使用 In CLI
安装 Installation:
```bash
yarn add --global h1de
# or
npm install -g h1de
```
一次性使用:
```bash
npx h1de [command] [...params]
```
### 代码使用 In codes
```bash
yarn add h1de
# or
npm install --save h1de
```
Demo:
```js
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:
```js
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:
```bash
h1de tr willin@willin.org
# echo Oo__o#aOo__o#@+.~ | tr O.+#_o~a@ wronlig@.
```
### base64(str)
Params:
- str: 必填 Required
JS Demo:
```js
const h1de = require('h1de');
h1de.base64('willin@willin.org');
// echo d2lsbGluQHdpbGxpbi5vcmc= | base64 -d
```
CLI Demo:
```bash
h1de base64 willin@willin.org
# echo d2lsbGluQHdpbGxpbi5vcmc= | base64 -d
```
## License
Apache 2.0
通过支付宝捐赠:
