Package Exports
- trek-captcha
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (trek-captcha) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
captcha
A Lightweight Pure JavaScript Captcha for Node.js. No C/C++, No ImageMagick, No canvas. Inspired By rucaptcha.
Installation
$ npm install trek-captcha --saveExamples
'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
}