npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hidden-from-bots-react

v1.0.0

Published

Say goodbye to bots looking for emails and phone numbers.

Downloads

402

Readme

Say goodbye to bots looking for emails and phone numbers

NPM

npm i hidden-from-bots-react

Yarn

yarn add hidden-from-bots-react

Using Hidden From Bots with React is very easy, you can do it with create-react-app or with Vite, only need to install hidden-from-bots-react in your project with your favorite package manager and import it in your project.

import "./App.css";
import { Email } from "hidden-from-bots-react";

function App() {
  return <div className="App">...</div>;
}

export default App;

In this case, I import Email to hide an email.

import { Email } from "hidden-from-bots-react";

But you can also import Phone to hide a phone number.

import { Phone } from "hidden-from-bots-react";

To hide an email you need to pass the email prop to the Email component and to hide a phone number you have to pass the phone prop to the Phone component.

import "./App.css";
import { Email, Phone } from "hidden-from-bots-react";

function App() {
  return (
    <div className="App">
      <Email email="[email protected]">Email</Email>
      <Phone phone="57123456789">Phone Number</Phone>
    </div>
  );
}

export default App;

You can also use css , css modules, sass, sass modules or style to style them to your liking, and you can switch the content between the Phone or Email tags to add custom text or an icon.

import "./App.css";
import styles from "./App.module.css";
import { Email, Phone } from "hidden-from-bots-react";

function App() {
  return (
    <div className="App">
      <Email className={styles.email} email="[email protected]">
        Email
      </Email>
      <Phone style={{ color: "red" }} phone="57123456789">
        Phone Number
      </Phone>
    </div>
  );
}

export default App;

To hide an email or phone number from more advanced bots you can import EmailBase64 for an email or PhoneBase64 for a phone number, the steps to use them are the same as the previous examples with just one extra step, in the email and phone prop we have to pass the email or the phone number in Base64, you can use the following link https://hiddenfrombots.js.org/encoder so you can transform them to Base64 or you can use the page you like to transform them to Base64.

import "./App.css";
import styles from "./App.module.css";
import { EmailBase64, PhoneBase64 } from "hidden-from-bots-react";

function App() {
  return (
    <div className="App">
      <EmailBase64 className={styles.email} email="aGVsbG9Ad29ybGQuY29t">
        Email
      </EmailBase64>
      <PhoneBase64 style={{ color: "red" }} phone="NTcxMjM0NTY3ODk=">
        Phone Number
      </PhoneBase64>
    </div>
  );
}

export default App;