1.0.4 • Published 5 months ago
maskio v1.0.4
MASKIO
MaskIO Is a data mask library designed for masking sensitive information. In short, it is easy to mask the data.
Documentation
You can find more details, API, and other docs on maskio-dev website.
Install
$ npm add -D maskio
API
import { maskText, maskObject } from 'maskio';
maskText('1234567890123456', 'bankCard'); // '************3456'
const source = {
firstCode: '123456',
otherCode: {
resultCode: '123',
name: '小明',
},
};
const config = { '^.*Code$': 'all', '^otherCode.name$': 'userName' };
maskObject(source, config); // {"firstCode": "******","otherCode": {"resultCode": "***","name": "*明"}}
Star History
Contributors
Please give us a 💖 star 💖 to support us. Thank you.
And thank you to all our backers! 🙏
License
maskio is licensed under a MIT License.