tencent-captcha-async
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

tencent-captcha-async

Promise based TencentCaptcha.

Usage

Types

async function useTencentCaptcha(
  appId: string,
  options?: Partial<TencentCaptchaOptions>
): Promise<TencentCaptchaCallback>

Example

import { useTencentCaptcha } from 'tencent-captcha-async'
useTencentCaptcha('Your CaptchaAppId here', {
  // options
})
  // CHECK PASSED
  .then(({ ticket, randStr }) => {
    // do something
  })
  // CHECK FAILED
  .catch(({ errorCode, errorMessage }) => {
    // handle error
  })

See more: https://cloud.tencent.com/document/product/1110/36841

Package Sidebar

Install

npm i tencent-captcha-async

Weekly Downloads

7

Version

1.0.0

License

MIT

Unpacked Size

15.6 kB

Total Files

30

Last publish

Collaborators

  • dragon-fish