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

@google-recaptcha/core

v1.0.5

Published

Tool that easily and quickly add Google ReCaptcha for your website or application

Downloads

4,585

Readme

🔑 Core Google ReCaptcha

🔑 tool that easily and quickly add Google ReCaptcha for your website or application

Install

Install with npm or yarn

$ npm i @google-recaptcha/core
# or
$ yarn add @google-recaptcha/core

🦉 Philosophy

🔑 Google ReCaptcha this is a library that will allow you to easily and quickly add Google ReCaptcha for your website or application. The main difference from other libraries is that all current versions of Google ReCaptcha are supported here.

Features

  • Support all recaptcha versions - support v3, v2-checkbox, v2-invisible
  • Enterprise mode - support enterprise
  • TypeScript support out of the box - full typed package
  • SSR - package work with server side render

Usage

Install 🔑 Core Google ReCaptcha with npm or yarn

$ npm i @google-recaptcha/core
# or
$ yarn add @google-recaptcha/core

V3

Google ReCaptcha v3 returns a score for each request without user friction. The score is based on interactions with your site and enables you to take an appropriate action for your site.

V2 invisible

Google ReCaptcha v2 invisible does not require users to solve any puzzles or enter any codes. Instead, it runs in the background and analyzes user behavior on the web page to determine if they are genuine users or potential bots.

V2 checkbox

When a user interacts with the Google ReCaptcha v2 checkbox, advanced algorithms analyze their behavior to distinguish between humans and bots. If the system suspects suspicious activity, additional challenges may be presented, such as image selections or puzzle-solving tasks.

Enterprise

Google ReCaptcha Enterprise is built on the existing reCAPTCHA API and it uses advanced risk analysis techniques to distinguish between humans and bots. In order to enable enterprise mode, you need to set the flag isEnterprise in GoogleReCaptchaProvider. Also in this mode you can pass specials actions.

API

generateGoogleReCaptchaScriptSrc

The function generateGoogleReCaptchaScriptSrc function may be needed for applications with ssr to get a link for the recaptcha script and load it before rendering the UI.

| Parameters | Type | Required | Note | | -------------- | :---------------------------------------: | ------------ | -------------------------------------------------------------------------------------------- | | host | recaptcha.net or google.com | No | Load script from recaptcha.net or google.com | | isEnterprise | Boolean | Yes | | | render | String | Yes | siteKey of reCaptcha | | hl | String | No | Prop to support different languages that is supported by Google Recaptcha | | badge | inline or bottomleft or bottomright | No | Reposition the reCAPTCHA badge. Depends on type of reCaptcha. If not provide badge is hidden |

generateGoogleReCaptchaHiddenBadgeStyles

The function generateGoogleReCaptchaHiddenBadgeStyles function returns hidden styles for Google ReCaptcha badge.

✨ Contributors