0.9.4 • Published 7 years ago

captcha-generator v0.9.4

Weekly downloads
31
License
ISC
Repository
-
Last release
7 years ago

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;