image-conversion
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "image-conversion", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "A simple and easy-to-use JS image convert tools, which can specify size to compress the image.", | ||
@@ -10,3 +10,6 @@ "main": "index.js", | ||
"src", | ||
"index.js" | ||
"index.d.ts", | ||
"index.js", | ||
"tsconfig.json", | ||
"webpack.config.js" | ||
], | ||
@@ -13,0 +16,0 @@ "keywords": [ |
@@ -31,3 +31,3 @@ import canvastoDataURL from './canvastoDataURL'; | ||
*/ | ||
async function compress(file: File, config: ICompressConfig = {}) { | ||
async function compress(file: File, config: ICompressConfig = {}): Promise<Blob> { | ||
if (!(file instanceof Blob)) { | ||
@@ -82,3 +82,3 @@ throw new Error('compress(): First arg must be a Blob object or a File object.'); | ||
*/ | ||
async function compressAccurately(file: Blob, config: compressAccuratelyConfig = {}) { | ||
async function compressAccurately(file: Blob, config: compressAccuratelyConfig = {}): Promise<Blob> { | ||
if (!(file instanceof Blob)) { | ||
@@ -85,0 +85,0 @@ throw new Error('compressAccurately(): First arg must be a Blob object or a File object.'); |
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
36175
21
509