1.0.3 • Published 5 years ago

data-masking v1.0.3

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

data-mask

a package for data masking

Installation

$ npm install data-mask

Usage

/**
 * options parameter is optional in the constructor.
 */
const { masking, show } = require('data-masking');

// Cover character
masking('17612345678', 3, 7); // 176****5678
masking('17612345678', -1, 11) // 1761234567*
masking('17612345678', 3, 7, '#'); // 176####5678

// Select show character
show('张三丰', 0, 1); // 张**
show('张三丰', -1); // **丰
show('张三丰', 0, 1, '#'); // 张##

License

Copyright (c) 2019 Hosea, Licensed under the MIT license.

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago