reactjs-captcha
Version: 
BotDetect Captcha React Component (JavaScript: React 0.13.x/0.14.x/15/16+)
20 lines (16 loc) • 499 B
JavaScript
var captchaHelper = require('./captcha-helper');
window.bdc_react_settings = window.bdc_react_settings || { 
    captchaEndpoint: '',
    captchaEnabled: true
};
var captchaSettings = {
    config: window.bdc_react_settings,
    get: function() {
        this.config.captchaEndpoint = this.config.captchaEndpoint.replace(/\/+$/g, '');
        return this.config;
    },
    set: function(settings) {
        captchaHelper.spread(this.config, settings);
    }
};
module.exports = captchaSettings;