Utility functions for captcha generation.
- Description:
Utility functions for captcha generation.
- Source:
Methods
(static) generateSvgCaptcha(options) → {module:Captcha~ReturnGenerateSvgCaptcha}
- Description:
Generates an SVG captcha with a mathematical expression.
- Source:
Example
import { generateSvgCaptcha } from "nsuite";
const { text, data } = await generateSvgCaptcha({
width: 148,
height: 48,
});
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options for generating the captcha. Properties
|
Returns:
An object containing the captcha text and data.
Type Definitions
ReturnGenerateSvgCaptcha
- Source:
Properties:
Name | Type | Description |
---|---|---|
text |
string | The text of the mathematical expression. |
data |
string | The SVG data of the captcha image. |
Type:
- Object