![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@south-paw/react-obfuscate-ts
Advanced tools
A React component to obfuscate your website's contact links
🕵️ A React component to obfuscate your website's contact links
email
, tel
, sms
, href
and any other string of text as a child.aria-label
for screen readers to identify the obfuscated element.as
prop for use with other Link components (such as your own UI libraries link).The component reverses the content in the DOM for you and uses CSS to re-reverse the content so it appears normally to the user, it also replaces the content of the link's href
attribute. When a user hovers, clicks or focuses the element, it is considered "interacted" and has its content un-reversed and the correct href
attribute applied. This ideally makes the link useless for a bot/spammer but ensures it remains user friendly when viewed normally.
import React from 'react';
import { Obfuscate } from '@south-paw/react-obfuscate-ts';
// use the component's children to create the link and display
const Example = () => <Obfuscate email>hello@example.com</Obfuscate>;
// or specify the email address for the link with custom children
const Example2 = () => <Obfuscate email="hello@example.com">Email me!</Obfuscate>;
I was inspired to create this package after using the coston/react-obfuscate package for two years. After switching the majority of my own code bases to TypeScript, I was disapointed to see there was no @types
package for this original version and that it wasn't reliably obfuscating in some of my usages of the component. I decided that I'd do a variant of that component with a new API, a few minor bug fixes and one that included types as well.
If you manage to find any, please report them here so they can be squashed.
MIT, see the LICENSE file.
FAQs
A React component to obfuscate contact links and text
The npm package @south-paw/react-obfuscate-ts receives a total of 1,120 weekly downloads. As such, @south-paw/react-obfuscate-ts popularity was classified as popular.
We found that @south-paw/react-obfuscate-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.