my-captcha-svg
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

my-captcha-svg

相关依赖、代码等一切资源如有侵犯到任何人的任何权益,请及时联系作者删除,抱歉(感谢)!

介绍

生成svg标签字符串

说明

本项目仅为了学习以下技能,无法保证生产环境是否可靠,请慎用!

  1. svg标签
  2. opentype.js
  3. rollup
  4. package.json文件配置
  5. npm publish
  6. 开源版权协议(看了下太复杂,已放弃,若本项目无版权纠纷则所有人亦可无条件使用

安装教程

npm i my-captcha-svg

使用说明

import captchaBuilder, {ICaptcha} from 'my-captcha-svg'

captchaBuilder.setConfig({
    bgColor: "#e9e1e1",
    length: 4,
    baseX: 5,
    baseY: 37,
    height: 40,
    width: 150,
    fontSize: 48,
    offsetX: 35,
    color: "#3dacc2",
    fontUrl: 'font-url',
    noiseColor: "#bb1e1e",
    noiseNum: 3,
    noiseWidth: 0.7,
    excludeChar: "i1l0oOe",
})

const captcha: ICaptcha = captchaBuilder.create()

console.log(captcha.text, captcha.svg)

传送门

  • 本项目参考svg-captcha编写,需要验证码的朋友建议直接出门左转更安全~

Readme

Keywords

Package Sidebar

Install

npm i my-captcha-svg

Weekly Downloads

0

Version

1.1.2

License

ISC

Unpacked Size

519 kB

Total Files

6

Last publish

Collaborators

  • skyorz