captcha-generator

0.9.4 • Public • Published

Install

$ npm install --save captcha-generator

Overview

This is a captcha generator that can only generate image verification code because I do not like ccap, ccap uses not only trouble but also low performance and easy memory leak. captcha-generator can also be used across platforms. preview

Usage

import {generate, createPlaintext} from "captcha-generator"

Get the verification code by default

const cimg = generate();
const {base64, plaintext, buffer, imageType} = cimg;

Customize picture content and width and height

const cimg = generate({
    text: createPlaintext(6),
    width: 500,
    height: 200,
    fontSize: 200
} );
const {base64, plaintext, buffer, imageType} = cimg;

Package Sidebar

Install

npm i captcha-generator

Weekly Downloads

180

Version

0.9.4

License

ISC

Last publish

Collaborators

  • com-melot-kk-web