Nothing Precedes Matter

    trek-captcha

    0.4.0 • Public • Published

    captcha

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

    Installation

    $ npm install trek-captcha --save
    

    Examples

    'use strict'
     
    const fs = require('fs')
    const captcha = require('trek-captcha')
     
    async function run() {
      const { token, buffer } = await captcha()
     
      // console.log(token, buffer)
     
      fs.createWriteStream('a.gif').on('finish', () => console.log(token)).end(buffer)
    }
     
    run()

    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

    Install

    npm i trek-captcha

    DownloadsWeekly Downloads

    653

    Version

    0.4.0

    License

    MIT

    Last publish

    Collaborators

    • fundon