1.1.2 • Published 1 year ago
my-captcha-svg v1.1.2
my-captcha-svg
If any of the relevant dependencies, codes and other resources infringe any rights and interests of anyone, please contact the author in time to delete, sorry (thanks)!
Description
generate captcha of svg
notice
This project is only for learning the following skills, which cannot guarantee the reliability of the production environment. Please use it with caution! 1. svg tag 2. opentype.js 3. rollup 4. package.json config 5. npm publish 6. Open source copyright agreement(Failed to learn,If there is no copyright dispute, the owner can use it unconditionally)
Installation
npm i my-captcha-svg
Instructions
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)
TP
- My project is completed by referring to svg-captcha,so use it is good idea~