https://github.com/fduseless/captchan
https://github.com/fduseless/captchan
captcha captcha-generator nodejs rust
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fduseless/captchan
- Owner: fduseless
- Created: 2024-04-22T13:37:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T02:59:24.000Z (about 2 years ago)
- Last Synced: 2025-03-16T00:12:52.594Z (about 1 year ago)
- Topics: captcha, captcha-generator, nodejs, rust
- Language: Rust
- Homepage:
- Size: 1.04 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CaptchaN
Captcha for Node js, which generates captcha image by Rust.
## Feature
- Native Package base on Rust.
- Simple, Easy to use;
- High performance.
## Install
Install captchan with yarn:
```bash
yarn add @fduseless/captchan
```
## Usage
```javascript
import { createImage, Format } from '@fduseless/captchan';
// with default value
const {text, image} = createImage();
// with options
const {text, image} = createImage(
len=4, // num of character
difficulty=5, // range [1,10]
line=true, // draw bezier curve or ellipse
noise=false, // whether add gaussian noise
format=Format.PNG, // PNG | JPG | JPEG | WEBP
);
```
## Thanks
[rucaptcha](https://github.com/huacnlee/rucaptcha)