Skip to content
/ masky Public

mask sensitive data

Notifications You must be signed in to change notification settings

omgaz/masky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

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: "[email protected]"
  }
};

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

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

or mask a single value:

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

About

mask sensitive data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published