01
Quick start
Install
npm install puddinhead
Puddinhead docs
Back homeDocs
Analyzer and anonymizer for emails, phone numbers, credit cards, IP addresses, URLs, and custom patterns.
Reference
Install, usage, endpoint, and response details.
Quick start
npm install puddinhead
Example usage
sanitize("My email is test@gmail.com")
-> "My email is [REDACTED]"
API endpoint
POST /analyze
Response example
POST /sanitize
More Capabilities
Detect entities first, then choose how to anonymize each one.
Supported entities
EMAIL_ADDRESS
PHONE_NUMBER
CREDIT_CARD
IP_ADDRESS
URL
Analyze example
analyze("Call +1 (415) 555-2671")
// [{ type: "PHONE_NUMBER", ... }]
Operators
replace
redact
mask
hash
keep
Sanitize example
{
"text": "Email test@gmail.com",
"operators": {
"EMAIL_ADDRESS": {
"type": "replace",
"newValue": "[EMAIL]"
}
}
}