Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anonymize-nlp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anonymize-nlp - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

4

package.json
{
"name": "anonymize-nlp",
"version": "1.0.5",
"version": "1.0.6",
"description": "Anonymize-NLP is a lightweight and robust package for text anonymization. It uses Natural Language Processing (NLP) and Regular Expressions (Regex) to identify and mask sensitive information in a string.,",

@@ -15,3 +15,3 @@ "main": "dist/index.js",

"bump": "npm version patch",
"package": "npm run lint && npm run build && npm run bump && npm publish",
"package": "npm run lint && npm run test && npm run build && npm run bump && npm publish",
"lint": "eslint --ext .ts src",

@@ -18,0 +18,0 @@ "test": "jest"

@@ -26,10 +26,10 @@ # AnonymizeNLP

const anonymizer = new AnonymizeNlp();
const anonymizedText = anonymizer.anonymize(`Hi i'm John Doe, my email is john@example.com and my phone number is +1-234-567-8900.`);
const anonymizedText = anonymizer.anonymize(`Hi I'm John Doe, my email is john@example.com and my phone number is +1-234-567-8900.`);
console.log(anonymizedText);
// Output: "Hi i'm <FIRSTNAME> <LASTNAME>, my email is <EMAIL> and my phone number is <PHONENUMBER>."
// Output: "Hi I'm <FIRSTNAME> <LASTNAME>, my email is <EMAIL> and my phone number is <PHONENUMBER>."
const originalText = anonymizer.deAnonymize(anonymizedText);
console.log(originalText);
// Output: "Hi i'm John Doe, my email is john@example.com and my phone number is +1-234-567-8900."
// Output: "Hi I'm John Doe, my email is john@example.com and my phone number is +1-234-567-8900."
```

@@ -36,0 +36,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc