New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hcaptcha/react-hcaptcha

Package Overview
Dependencies
Maintainers
4
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hcaptcha/react-hcaptcha - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

25

dist/index.js

@@ -333,2 +333,27 @@ "use strict";

}, {
key: "setData",
value: function setData(data) {
var captchaId = this.state.captchaId;
if (!this.isReady()) {
return;
}
if (data && (0, _typeof2["default"])(data) !== "object") {
data = null;
}
hcaptcha.setData(captchaId, data);
}
}, {
key: "getResponse",
value: function getResponse() {
return hcaptcha.getResponse(this.state.captchaId);
}
}, {
key: "getRespKey",
value: function getRespKey() {
return hcaptcha.getRespKey(this.state.captchaId);
}
}, {
key: "render",

@@ -335,0 +360,0 @@ value: function render() {

2

package.json
{
"name": "@hcaptcha/react-hcaptcha",
"version": "1.1.1",
"version": "1.2.0",
"types": "types/index.d.ts",

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

@@ -152,3 +152,6 @@ # React hCaptcha Component Library

|`execute()`|Programmatically trigger a challenge request. Additionally, this method can be run asynchronously and returns a promise with the `token` and `eKey` when the challenge is completed.|
|`getRespKey()`|Get the current challenge reference ID|
|`getResponse()`|Get the current challenge response token from completed challenge|
|`resetCaptcha()`|Reset the current challenge|
|`setData()`|See enterprise docs.|

@@ -155,0 +158,0 @@

@@ -268,2 +268,24 @@ const React = require('react');

setData (data) {
const { captchaId } = this.state;
if (!this.isReady()) {
return;
}
if (data && typeof data !== "object") {
data = null;
}
hcaptcha.setData(captchaId, data);
}
getResponse() {
return hcaptcha.getResponse(this.state.captchaId);
}
getRespKey() {
return hcaptcha.getRespKey(this.state.captchaId)
}
render () {

@@ -270,0 +292,0 @@ const { elementId } = this.state;

@@ -42,2 +42,5 @@ // Type definitions for @hcaptcha/react-hcaptcha 0.1

removeCaptcha(): void;
getRespKey(): string;
getResponse(): string;
setData(data: object): void;
execute(opts: { async: true }): Promise<ExecuteResponse>;

@@ -44,0 +47,0 @@ execute(opts?: { async: false }): void;

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