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

extract-email-address

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extract-email-address - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

3

dist/normalizeInput.js

@@ -15,3 +15,4 @@ "use strict";

var _default = input => {
return input.replace(emojiRegex, ' ').replace(/(?<=\s|^)([a-z0-9.-_@])\s?(?=[a-z0-9.-_@](?:\s|$))/g, '$1').replace(/\s+at\s+/g, '@').replace(/\s+dot\s+/g, '.').replace(/\s*<at>\s*/g, '@').replace(/\s*<dot>\s*/g, '.').replace(/\s*\(at\)\s*/g, '@').replace(/\s*\(dot\)\s*/g, '.').replace(/\s*\[at\]\s*/g, '@').replace(/\s*\[dot\]\s*/g, '.').trim();
return input.replace(emojiRegex, ' ').replace(/(?<=\s|^)([a-z0-9.-_@])\s?(?=[a-z0-9.-_@](?:\s|$))/g, '$1').replace(/\s+at\s+/g, '@').replace(/\s+dot\s+/g, '.').replace(/\s*<at>\s*/g, '@').replace(/\s*<dot>\s*/g, '.').replace(/\s*\(at\)\s*/g, '@').replace(/\s*\(dot\)\s*/g, '.').replace(/\s*\[at\]\s*/g, '@').replace(/\s*\[dot\]\s*/g, '.') // Matches all ASCII characters from the space to tilde.
.replace(/[^ -~]/g, ' ').trim();
};

@@ -18,0 +19,0 @@

@@ -87,3 +87,3 @@ {

},
"version": "1.2.0"
"version": "1.3.0"
}

@@ -50,2 +50,5 @@ <a name="extract-email-address"></a>

extractEmail('extracts emails surrounded by odd unicode characters, e.g. 邮箱:gajus@gajus.com');
// [{email: 'gajus@gajus.com'}]
extractEmail('extracts emails surrounded by emojis, e.g. 📧gajus@gajus.com');

@@ -52,0 +55,0 @@ // [{email: 'gajus@gajus.com'}]

@@ -19,3 +19,6 @@ // @flow

.replace(/\s*\[dot\]\s*/g, '.')
// Matches all ASCII characters from the space to tilde.
.replace(/[^ -~]/g, ' ')
.trim();
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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