qrcode-svg-ts
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -1,5 +0,5 @@ | ||
const QRCodeSVG = require('./index') | ||
const QRCodeSVG = require("./index"); | ||
console.log( | ||
new QRCodeSVG('123') | ||
.dataURL() | ||
); | ||
); |
@@ -1,4 +0,5 @@ | ||
declare type QRCodeSVGSaveCallBack = (error:any, result:any) => void | ||
declare interface QRCodeSVGOptions { | ||
type QRCodeSVGSaveCallBack = (error:any, result:any) => void | ||
interface QRCodeSVGOptions { | ||
/** | ||
@@ -52,24 +53,26 @@ * 二维码内容 | ||
container?: 'svg' | 'svg-viewbox' | 'g' | 'none' | ||
} | ||
} | ||
declare const QRCodeSVG: { | ||
new(options: QRCodeSVGOptions|string): QRCodeSVG; | ||
}; | ||
declare const QRCodeSVG: { | ||
new(options: QRCodeSVG.Options); | ||
interface QRCodeSVG { | ||
/** | ||
* 获取svg文件 | ||
*/ | ||
svg(): string | ||
/** | ||
* 转换为 data:image/svg+xml 格式 | ||
* 可以直接使用 img 标签展示 | ||
*/ | ||
dataURL(): string | ||
/** | ||
* 保存svg文件 | ||
* @param file 文件保存的路径 | ||
* @param callback 保存的结果 | ||
*/ | ||
save(file: string, callback: QRCodeSVG.SaveCallBack): void | ||
}; | ||
svg(): string | ||
/** | ||
* 转换为 data:image/svg+xml 格式 | ||
* 可以直接使用 img 标签展示 | ||
*/ | ||
dataURL(): string | ||
/** | ||
* 保存svg文件 | ||
* @param file 文件保存的路径 | ||
* @param callback 保存的结果 | ||
*/ | ||
save(file: string, callback: QRCodeSVGSaveCallBack): void | ||
} | ||
@@ -76,0 +79,0 @@ |
{ | ||
"name": "qrcode-svg-ts", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A simple QR Code generator in pure JavaScript", | ||
@@ -5,0 +5,0 @@ "author": "SHLYREN", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67076
1060