Socket
Socket
Sign inDemoInstall

tyrcode-captcha

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tyrcode-captcha

仿写验证码


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

验证码 - 下载

npm i tyrcode-captcha -S

验证码 - 使用

const captcha = require('tyrcode-captcha')
let temp = captcha.create()
console.log(temp) // {text:'D3DS', data: '<svg></svg>'}

验证码 - 结合HTTP模块

const http = require('http')
const captcha = require('tyrcode-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');
})

Keywords

FAQs

Last updated on 07 Jun 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc