svg_captcha_dxy

1.0.4 • Public • Published

⭐️ 随机验证码 - 下载

npm i svg_captcha_dxy -S

🌰 随机验证码 - 使用

const captcha = require('svg_captcha_dxy')
let temp = captcha.create({
    num:3,
    color:true,
    noise:3
})
console.log(temp) // {text:'D3DS', data: '<svg></svg>'}

🌰 随机验证码 - 结合HTTP模块

const http = require('http')
const captcha = require('svg_captcha_dxy')

http.createServer((req, res) => {
    res.setHeader('content-type', 'text/html;charset=utf-8')
    let temp = captcha.create({num:4,color:false,noise:4})
    res.end(temp.data)
}).listen(3000, () => {
    console.log('启动成功, 访问  http://localhost:3000');
})

Readme

Keywords

Package Sidebar

Install

npm i svg_captcha_dxy

Weekly Downloads

5

Version

1.0.4

License

ISC

Unpacked Size

4.01 kB

Total Files

4

Last publish

Collaborators

  • dxy95