2.0.1 ⢠Published 1 year ago
partially-hide-email-phone v2.0.1
Welcome to partially-hide-email-phone š
š Homepage
A simple utility to partially hide email addresses or phone numbers.
Features
- Partially hides email addresses (e.g.,
exampleemail@domain.com
->ex**pl**ma**@domain.com
) - Partially hides phone numbers (e.g.,
62811203898
->6281****898
) - Validates input for proper email and phone number formats
- Lightweight and easy to use
Install
Install the package using npm:
npm install partially-hide-email-phone
Usage
Import the module and use the functions to partially hide email addresses and phone numbers:
const hideEmailPhone = require('partially-hide-email-phone');
const email = 'exampleemail@domain.com';
const phoneNumber = '62811203898';
console.log(hideEmailPhone.hideEmail(email)); // Output: ex**pl**ma**@domain.com
console.log(hideEmailPhone.hidePhone(phoneNumber)); // Output: 6281****898
API
hideEmail(email)
- email (string): The email address to be partially hidden.
- Returns the partially hidden email address.
hidePhone(phone)
- phone (string): The phone number to be partially hidden.
- Returns the partially hidden phone number.
Run tests
Run the test suite to ensure everything is working correctly:
npm run test
Contributing
Contributions are welcome! Please open an issue or submit a pull request with your improvements.
Author
š¤ Ali Jaradat (AmJaradat01@gmail.com)
- Github: @AmJaradat01
This project is licensed under the MIT License - see the LICENSE file for details.
This implementation should help you enhance the functionality and maintainability of your "partially-hide-email-phone" repository. Let me know if you need further assistance!