Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

*️⃣

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"

About

mask sensitive data

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages