@2080code/pic-processer 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/demo/demo.html +3 -3
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
# pic-processer
|
|
2
|
-
|
|
1
|
+
# @2080code/pic-processer
|
|
2
|
+

|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## 介绍
|
|
8
|
+
用来对图片做压缩,把 File 对象转为 dataURL,又或者把 dataURL 转为 File 对象。
|
|
3
9
|
|
|
4
10
|
## 安装
|
|
5
11
|
```bash
|
|
@@ -8,7 +14,7 @@ npm install @2080code/pic-processer
|
|
|
8
14
|
|
|
9
15
|
## 使用
|
|
10
16
|
```javascript
|
|
11
|
-
import
|
|
17
|
+
import PicProcesser from '@2080code/pic-processer'
|
|
12
18
|
```
|
|
13
19
|
或
|
|
14
20
|
```html
|
package/demo/demo.html
CHANGED
|
@@ -145,9 +145,9 @@
|
|
|
145
145
|
`
|
|
146
146
|
|
|
147
147
|
document.getElementById('file-info').innerHTML=`
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
name: <em>${exportedFile.name}</em><br/>
|
|
149
|
+
size: <em>${exportedFile.size} byte</em><br/>
|
|
150
|
+
type: <em>${exportedFile.type}</em>
|
|
151
151
|
`
|
|
152
152
|
}
|
|
153
153
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2080code/pic-processer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "图片压缩、改变图片尺寸、File 和 dataURL 互转",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "./src/types.ts",
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
"url": "git+https://github.com/2080code/pic-processer.git"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
18
|
+
"picture",
|
|
19
|
+
"compress",
|
|
20
|
+
"base64",
|
|
21
|
+
"dataURL",
|
|
21
22
|
"js",
|
|
22
|
-
"css",
|
|
23
|
-
"background",
|
|
24
23
|
"canvas"
|
|
25
24
|
],
|
|
26
25
|
"publishConfig": {
|