# @redbuck/verify

> robot verify

Latest version **0.0.1** (published 2019-05-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @redbuck/verify
pnpm add @redbuck/verify
yarn add @redbuck/verify
bun add @redbuck/verify
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-05-01 |
| First published | 2019-05-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 186.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | TY-xie |
| Maintainers | redbuck |
| Keywords | verify, canvas |

## Links

- npm: https://www.npmjs.com/package/@redbuck/verify
- Repository: https://github.com/xty1992a/verify
- Homepage: https://github.com/xty1992a/verify#readme
- Issues: https://github.com/xty1992a/verify/issues
- npm.io page: https://npm.io/package/@redbuck/verify

## Dependencies (1)

- [preact](https://npm.io/package/preact.md) ^8.4.2

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2019-05-01

## README

### 机器人验证弹窗

#### live code
[live code](https://codepen.io/xty1992a/pen/xeoKam)

#### 简介
一个简单的验证弹窗.命令式调用,用户需要按照特定顺序点击canvas上的特定字符才能验证通过.
最终打包格式为umd,可`<script>`和import/require引入使用.


#### 安装
js: `npm i @redbuck/verify`或`yarn add @redbuck/verify`

css: 位于`@redbuck/verifyr/lib/verify.css`

#### 使用
```

Verify(options)  // => promise

// 为了便于async/await使用,只会resolve,返回{success: Boolean}
```

options:

属性 | 类型 | 默认值|描述
--:|--:|--:|--:
getCodeAsync| `Function` | 100|截图框及输出尺寸

#### 示例
```
const getCode = () => {
  let text = ranger(1000, 9999) + '';
  return {
    text,
    img: '/static/2.png',
    expectText: text.split('').reverse().join(''),
  }
}

Verify({
	// 刷新,获取新数据
	getCodeAsync(callback) {
	  const options = getCode()
	  callback(options)
	},
  })
  .then(result => {
    // 验证成功返回
    console.log(result.success)
  })
```

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