1.0.0 • Published 7 years ago

ccaptcha v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

CCaptcha

Customize Captcha with redis.

Installation

npm install ccaptcha

Usage

const captcha = require('ccaptcha');

Generate

let captchaValue = await captcha.generateCaptcha('159xxxx8250')

If you want to set expired time, for example:

// twenty minutes expired time
let captchaValue = await captcha.generateCaptcha('159xxxx8250', {
    expired: 20 * 60
})

Check

let result = await captcha.checkCaptcha('1000', '159xxxx8250')