1.2.2 • Published 5 years ago

@garvey/shield v1.2.2

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

garvey-shield

This library shield sensitive data to show.

use it

run

npm i @garvey/shield

and write in your file:

const shield = require('@garvey/shield')
// or
import shield from '@garvey/shield'
// or
import {name} from '@garvey/shield'
// or
...as you want

methods

name(name,type?)

name:张三丰
type:
ValueRuleexample
1(default)last name and asterisk张**
2asterisk and first name*三丰
3last name and asterisk and first name张*丰

phone(phoneNum)

中国三网11位手机号13800138000 → 138****8000

identity(identityNum)

大陆二代身份证号18位,支持结尾字母 110123456789012345 → 110***2345

email(email)

abcd1234@gmail.com → a**4@gmail.com

password(pw)

abcd1234 → ****

bankAccount(account)

6200123412345678 → 6200****5678

need more function?

To github and open a issue .

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago