New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

captcha-lvshi

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

captcha-lvshi - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "captcha-lvshi",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "captcha.js",

@@ -1,19 +0,30 @@

// cnpm init -y # 生成package.json文件
// cnpm i svg-captcha -S
# 验证码小物件-下载
```
cnpm i captcha-lvshi -S
// 导入
const http = require('http')
const svgCaptcha = require('./captcha')
// 使用
```
# 验证码使用
```
const captcha = require('webopenfather-captcha')
let temp = captcha.create()
```
# 验证码小物件 - 结合HTTP模块
```
onst http = require('http')
const captcha = require('webopenfather-captcha')
http.createServer((req, res) => {
let captcha = svgCaptcha.create(30,'pink')
// console.log(captcha); // {data, text}
// res.setHeader('content-type', 'text/html;charset=utf-8')
res.setHeader("content-type", "image/svg+xml");
res.end(captcha.data)
}).listen(3000, () => {
console.log('启动成功, 访问测试 http://localhost:3000');
})
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');
})
```
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc