Socket
Socket
Sign inDemoInstall

react-obfuscate-email

Package Overview
Dependencies
4
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

@@ -7,7 +7,11 @@ # React Obfuscate Email

[![CodeFactor](https://www.codefactor.io/repository/github/mauriciorobayo/react-obfuscate-email/badge)](https://www.codefactor.io/repository/github/mauriciorobayo/react-obfuscate-email)
[![bundlephobia](https://badgen.net/bundlephobia/minzip/react-obfuscate-email)](https://bundlephobia.com/package/react-obfuscate-email)
📧 React component to obfuscate email links.
📧🚫🤖 **Simple and lightweight email obfuscator React component**.
[Storybook](https://www.mauriciorobayo.com/react-obfuscate-email)
- No dependencies
- Tree-shakeable
Read the [documentation 📘](https://www.mauriciorobayo.com/react-obfuscate-email).
## Usage

@@ -63,11 +67,17 @@

The component also accepts `body` and `subject` props that will be properly encoded for the link:
The component also accepts `body`, `subject`, `cc`, and `bcc` props that will be properly encoded for the link:
```jsx
<Email email="test@example.com" body="You rock!" subject="Hello 👋" />
<Email
email="test@example.com"
body="You rock!"
subject="Hello 👋"
cc={["cc1@example.com", "cc2@example.com"]}
bcc={["bcc@example.com"]}
/>
```
Will properly produce `test@example.com?body=You%20rock!&subject=Hello%20%F0%9F%91%8B` as the `href` attribute once human interaction is detected (notice spaces are percent encoded instead of being replaced with '+').
Will properly produce `test@example.com?body=You%20rock!&subject=Hello%20%F0%9F%91%8B&cc=cc1%40example.com%2Ccc2%40example.com&bcc=bcc%40example.com` as the `href` attribute once human interaction is detected (notice spaces are percent encoded instead of being replaced with '+').
You can also include the `_target` attribute (or any other `a` attribute):
You can also include the `_target` attribute (or any other `a` tag attribute):

@@ -74,0 +84,0 @@ ```jsx

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc