node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »


build status # datamask.js #

A simple module to mask emails, domains and even regular strings!


To set up datamask.js on your Node.js server use npm.

npm install datamask

Example Usage

var datamask = require('datamask');
//email(address, mask_char, user_percent, domain_percent)
console.log('')); //t**t@e****
console.log('', '#', 45, 80)); //
//string(value, mask_char, percent)
console.log(datamask.string('I\'m a string!', '*', 30)); //I'm a***ring
//domain(value, mask_char, percent)
console.log(datamask.domain('', '*', 50)); //ex***