A utility collection of redacting email address, phone number or something you don't want to show to others

Install

$ npm install --save redact-me

Usage

const redact = require ( ' redact-me ' ) ; redact ( ' email username@example.com ' ) ; redact ( ' phone 123-456-7890 ' ) ; redact ( ' Visa: 4242424242424242 ' ) ; redact ( ' SSN: 000-00-0000 ' ) ; redact ( ' IP Address: 192.168.0.1 ' ) ;

API

str

Type: string

String to redact info from.

options

stripEmail

Type: boolean

Default: true

stripPhone

Type: boolean

Default: true

stripSSN

Type: boolean

Default: true

stripCreditCard

Type: boolean

Default: true

stripIpAddress

Type: boolean

Default: true

redactString