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

0.5.1 • Public • Published

captcha

A Lightweight Pure JavaScript Captcha for Fibjs. No C/C++, No ImageMagick, No canvas. Inspired By rucaptcha.

Installation

$ npm install fibjs-captcha --save

Examples

'use strict'

const fs = require('fs')
const captcha = require('fibjs-captcha')

const { token, buffer } = captcha()
// console.log(token, buffer)

fs.writeFile(`${token}.gif`, buffer);

API

captcha({ size: 5, style: -1 })

  • size: Defaults to 5.
  • style: Defaults to -1 with random.
// returns
{
  token,
  buffer
}

Badges

Linux Windows codecov


fundon.me  ·  GitHub @fundon  ·  Twitter @_fundon

/fibjs-captcha/

    Package Sidebar

    Install

    npm i fibjs-captcha

    Weekly Downloads

    6

    Version

    0.5.1

    License

    MIT

    Unpacked Size

    52.1 kB

    Total Files

    11

    Last publish

    Collaborators

    • dotcoo