Socket
Socket
Sign inDemoInstall

masky

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    masky

mask sensitive json


Version published
Weekly downloads
43
increased by7.5%
Maintainers
1
Install size
3.33 kB
Created
Weekly downloads
 

Readme

Source

:asterisk:

masky

mask sensitive data



masky is a simple, no-fuss, value masker.

masky automatically masks all values in an object, recursively.

masky allows you to omit "safe" values and even caters for emails.

masky doesn't offer much in the way of customisations, it's content being what it is.



const masky = require("masky");

const mySecrets = {
  name: "Superman",
  alias: "Clarke Kent",
  contact: {
    phone: "0123999911",
    email: "clarke.kent@fortressofsolitude.com"
  }
};

const safeSecrets = masky.mask(mySecrets, ["name"]);

console.log(safeSecrets);
{
  "name": "Superman",
  "alias": "C********t",
  "contact": {
    "phone": "0*******1",
    "email": "c********t@fortressofsolitude.com"
  }
}

or mask a single value:

masky.maskString("04fad440-aae2-4596-b9cc-800204eaf8ac");
"04fad4e***********************af8ac"

Keywords

FAQs

Last updated on 01 Apr 2020

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