Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-google-recaptcha

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-google-recaptcha - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

.eslintignore

10

lib/recaptcha.js

@@ -66,4 +66,4 @@ "use strict";

if (this.props.grecaptcha && !this.state.widgetId) {
this.captcha.getDOMNode();
var id = this.props.grecaptcha.render(this.captcha.getDOMNode(), {
this.refs.captcha;
var id = this.props.grecaptcha.render(this.refs.captcha, {
sitekey: this.props.sitekey,

@@ -92,4 +92,2 @@ callback: this.props.onChange,

render: function render() {
var _this = this;
// consume properties owned by the reCATPCHA, pass the rest to the div so the user can style it.

@@ -109,5 +107,3 @@ /* eslint-disable no-unused-vars */

/* eslint-enable no-unused-vars */
return _react2["default"].createElement("div", _extends({}, childProps, { ref: function (component) {
_this.captcha = component;
} }));
return _react2["default"].createElement("div", _extends({}, childProps, { ref: "captcha" }));
}

@@ -114,0 +110,0 @@ });

{
"name": "react-google-recaptcha",
"version": "0.4.0",
"version": "0.5.0",
"description": "React Component Wrapper for Google reCAPTCHA",

@@ -10,6 +10,9 @@ "main": "lib/recaptcha-wrapper.js",

"scripts": {
"build": "node run-babel tools/build.js",
"lint": "eslint src test tools webpack karma.conf.js",
"test": "karma start --single-run && npm run build",
"test-watch": "karma start"
"build": "rm -rf lib && babel src --out-dir lib",
"lint": "eslint ./",
"test": "karma start --single-run",
"test-watch": "karma start",
"patch": "release patch --run",
"minor": "release minor --run",
"major": "release major --run"
},

@@ -34,3 +37,3 @@ "repository": {

"peerDependencies": {
"react": ">=0.13"
"react": ">=0.14"
},

@@ -40,12 +43,11 @@ "devDependencies": {

"babel-core": "~5.8.22",
"babel-eslint": "~4.0.8",
"babel-eslint": "~4.1.3",
"babel-loader": "~5.3.2",
"chai": "~3.2.0",
"chai": "~3.3.0",
"child-process-promise": "~1.1.0",
"colors": "~1.1.0",
"es5-shim": "~4.1.3",
"eslint": "~1.1.0",
"eslint-config-defaults": "~4.0.1",
"eslint-plugin-react": "~3.2.3",
"fs-promise": "~0.3.1",
"eslint": "~1.6.0",
"eslint-config-defaults": "~7.0.1",
"eslint-plugin-react": "~3.5.1",
"karma": "~0.13.9",

@@ -57,16 +59,17 @@ "karma-chai": "~0.1.0",

"karma-mocha-reporter": "~1.1.1",
"karma-phantomjs-launcher": "~0.2.1",
"karma-phantomjs-launcher": "^0.2.1",
"karma-sourcemap-loader": "~0.3.5",
"karma-webpack": "~1.7.0",
"lodash": "~3.10.1",
"mocha": "~2.2.5",
"react": "~0.13.3",
"webpack": "~1.11.0",
"yargs": "~3.19.0"
"mocha": "~2.3.3",
"mt-changelog": "^0.6.2",
"phantomjs": "^1.9.18",
"react": "~0.14.0",
"react-dom": "~0.14.0",
"release-script": "^0.5.3",
"webpack": "~1.12.2"
},
"dependencies": {
"babel-runtime": "^5.8.0",
"react-async-script": "~0.4.0"
"react-async-script": "~0.5.0"
}
}

@@ -8,3 +8,3 @@ # react-google-recaptcha

Component wrapper for [Google reCAPTCHA][reCAPTCHA]
Component wrapper for [Google reCAPTCHA v2][reCAPTCHA]

@@ -17,2 +17,8 @@ ## Installation

### React 0.13
With 0.13, install version 0.4.0
```shell
npm install --save react-google-recaptcha@0.4.0
```
## Usage

@@ -26,3 +32,4 @@

var React = require("react");
var ReCATPCHA = require("react-google-recaptcha");
var render = require("react-dom").render
var ReCAPTCHA = require("react-google-recaptcha");

@@ -33,8 +40,10 @@ function onChange(value) {

React.render(
<ReCATPCHA
refs="recaptcha"
sitekey="Your client site key"
onChange={onChange}
/>, document.body);
render(
<ReCAPTCHA
ref="recaptcha"
sitekey="Your client site key"
onChange={onChange}
/>,
document.body
);
```

@@ -68,3 +77,4 @@

var React = require("react");
var ReCATPCHA = require("react-google-recaptcha/lib/recaptcha");
var render = require("react-dom").render
var ReCAPTCHA = require("react-google-recaptcha/lib/recaptcha");

@@ -77,20 +87,13 @@ var grecaptchaObject = grecaptcha // You must provide access to the google grecaptcha object.

React.render(
<ReCATPCHA
refs="recaptcha"
sitekey="Your client site key"
onChange={onChange}
grecaptcha={grecaptchaObject}
/>, document.body);
render(
<ReCAPTCHA
ref="recaptcha"
sitekey="Your client site key"
onChange={onChange}
grecaptcha={grecaptchaObject}
/>,
document.body
);
```
## To Come Soon
- tests
- examples
- code coverage
*The build is highly inspired by [react-bootstrap][rb]*
[travis.img]: https://travis-ci.org/dozoisch/react-google-recaptcha.svg?branch=master

@@ -97,0 +100,0 @@ [travis.url]: https://travis-ci.org/dozoisch/react-google-recaptcha

@@ -52,4 +52,4 @@ import React, { PropTypes } from "react";

if (this.props.grecaptcha && !this.state.widgetId) {
this.captcha.getDOMNode();
let id = this.props.grecaptcha.render(this.captcha.getDOMNode(), {
this.refs.captcha;
let id = this.props.grecaptcha.render(this.refs.captcha, {
sitekey: this.props.sitekey,

@@ -83,3 +83,3 @@ callback: this.props.onChange,

return (
<div {...childProps} ref={(component) => { this.captcha = component; }} />
<div {...childProps} ref="captcha" />
);

@@ -86,0 +86,0 @@ },

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