Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trekjs/captcha
A Lightweight Pure JavaScript Captcha for Node.js. No C/C++, No ImageMagick, No Canvas.
https://github.com/trekjs/captcha
captcha pure-javascript
Last synced: 1 day ago
JSON representation
A Lightweight Pure JavaScript Captcha for Node.js. No C/C++, No ImageMagick, No Canvas.
- Host: GitHub
- URL: https://github.com/trekjs/captcha
- Owner: trekjs
- License: mit
- Created: 2017-02-05T23:43:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-31T10:05:14.000Z (7 months ago)
- Last Synced: 2024-10-31T13:06:47.958Z (8 days ago)
- Topics: captcha, pure-javascript
- Language: JavaScript
- Homepage:
- Size: 134 KB
- Stars: 466
- Watchers: 9
- Forks: 46
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-captcha - trekjs/captcha - A Lightweight Pure JavaScript CAPTCHA dla Node.js. No C/C++, No ImageMagick, No Canvas. (Biblioteki)
- awesome-nodejs-pure-js - trek captcha
README
# captcha
A Lightweight Pure JavaScript Captcha for Node.js. No C/C++, No ImageMagick, No canvas. Inspired By [rucaptcha](https://github.com/huacnlee/rucaptcha).
## Installation
```
$ npm install trek-captcha --save
```## Examples
```js
'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.```js
// returns
{
token,
buffer
}
```## Badges
[![Linux](https://travis-ci.org/trekjs/captcha.svg?branch=master)](https://travis-ci.org/trekjs/captcha)
[![Windows](https://img.shields.io/appveyor/ci/fundon/captcha/master.svg?label=windows)](https://ci.appveyor.com/project/fundon/captcha)
[![codecov](https://codecov.io/gh/trekjs/captcha/branch/master/graph/badge.svg)](https://codecov.io/gh/trekjs/captcha)
![](https://img.shields.io/badge/license-MIT-blue.svg)---
> [fundon.me](https://fundon.me) ·
> GitHub [@fundon](https://github.com/fundon) ·
> Twitter [@_fundon](https://twitter.com/_fundon)