Skip to content

Commit e010365

Browse files
committed
Fix async() examples
The example incorrectly used `.async({type: "uint8array"})` instead of `.async("uint8array")`. Fixes Stuk#456.
1 parent a194607 commit e010365

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/api_zipobject/async.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Note : when using type = "uint8array", "arraybuffer" or "blob", be sure to
3434
check if the browser supports it (you can use [`JSZip.support`]({{site.baseurl}}/documentation/api_jszip/support.html)).
3535

3636
```js
37-
zip.file("image.png").async({type: "uint8array"}).then(function (u8) {
37+
zip.file("image.png").async("uint8array").then(function (u8) {
3838
// ...
3939
});
4040
```
@@ -54,7 +54,7 @@ name | type | description
5454
percent | number | the percent of completion (a double between 0 and 100)
5555

5656
```js
57-
zip.file("image.png").async({type: "uint8array"}, function updateCallback(metadata) {
57+
zip.file("image.png").async("uint8array", function updateCallback(metadata) {
5858
console.log("progression: " + metadata.percent.toFixed(2) + " %");
5959
}).then(function (u8) {
6060
// ...

0 commit comments

Comments
 (0)