1. conceal
Conceals a string or part of it behind a specific character
conceal
Package: conceal
Created by: sergi
Last modified: Mon, 13 Jun 2022 20:39:47 GMT
Version: 1.0.0
License: MIT
Downloads: 465
Repository: https://github.com/sergi/conceal

Install

npm install conceal
yarn add conceal

conceal

Obfuscates a string or a part of it. I've needed this functionality several
times now and I've decided to make a micro-module for it. It is useful to
conceal sensitive strings such as passwords, or parts of a string, e.g. a
credit card to show the user.

 var conceal = require('conceal');

var str = 'Big Secret';

conceal(str);
// '**********'

conceal(str, { ch: '^' });
// '^^^^^^^^^^'

conceal(str, { start: 4, end: 6 });
// 'Big ***ret'

License

MIT

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code