READMESource: main@186fecef
dsh-text-mask · 文本脱敏
把文本中的敏感信息(邮箱、手机号、身份证号、银行卡号、IP、密钥/令牌)替换为掩码,返回脱敏文本与命中计数。纯 Node 实现,无网络、无外部服务。
提供的工具
| 工具 | 作用 |
|---|---|
mask_text |
脱敏文本中的 PII 与密钥 |
安装
dsh plugin add dsh-text-mask
安装后在 profile 的 package.json 的 dsh.profile.bundles 中加入 "dsh-text-mask"。
用法示例
把这段日志里的敏感信息脱敏后再给我
→ 调用 mask_text(text="...")
No comments yet. Be the first to write one.