# yaya-captcha

> ``` // cnpm i yaya-captcha -S ```

Latest version **1.0.2** (published 2022-06-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install yaya-captcha
pnpm add yaya-captcha
yarn add yaya-captcha
bun add yaya-captcha
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-06-14 |
| First published | 2022-06-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yayabazc |

## Links

- npm: https://www.npmjs.com/package/yaya-captcha
- npm.io page: https://npm.io/package/yaya-captcha

## Dependencies (1)

- [yaya-captcha](https://npm.io/package/yaya-captcha.md) ^1.0.0

## Recent versions

- 1.0.2 (latest) — 2022-06-14
- 1.0.0 — 2022-06-14

## README

# 下载

```
// cnpm i yaya-captcha -S
```

# 使用

```
const http = require('http')
const svgCaptcha = require('yaya-captcha')
http.createServer((req, res) => {

    let captcha = svgCaptcha.create()
    // console.log(captcha); // {data, text}

    // res.setHeader('content-type', 'text/html;charset=utf-8')
    res.setHeader("content-type", "image/svg+xml");
    res.end(captcha.data)
}).listen(3000, () => {
    console.log('启动成功， 访问测试 http://localhost:3000');
})

```

# 使用

```
const http = require('http')
const captcha = require('webopenfather-captcha')

http.createServer((req, res) => {
res.setHeader('content-type', 'text/html;charset=utf-8')
let temp = captcha.create()
// console.log(temp) // {text:'D3DS', data: '<svg></svg>'}
res.end(temp.data)
}).listen(3000, () => {
console.log('启动成功， 访问 http://localhost:3000');
})
```

---
_Source: https://npm.io/package/yaya-captcha · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
