Socket
Socket
Sign inDemoInstall

conceal

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    conceal

Conceals a string or part of it behind a specific character


Version published
Weekly downloads
86
decreased by-6.52%
Maintainers
1
Install size
72.1 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 02 Dec 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc