We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 059c138 commit 5479fb1Copy full SHA for 5479fb1
lib/github/tree.js
@@ -58,10 +58,10 @@ class GitHubTree {
58
return `${this.repoUrl}/tree/${commit.slice(0, 10)}/${this.path}`;
59
}
60
61
- async text(assetPath) {
+ async buffer(assetPath) {
62
await this.getLastCommit();
63
const url = this.getAssetUrl(assetPath);
64
- return this.request.text(url);
+ return this.request.buffer(url);
65
66
67
/**
lib/request.js
@@ -37,6 +37,10 @@ class Request {
37
return wrappedFetch(url, options);
38
39
40
+ async buffer(url, options = {}) {
41
+ return this.fetch(url, options).then(res => res.buffer());
42
+ }
43
+
44
async text(url, options = {}) {
45
return this.fetch(url, options).then(res => res.text());
46
0 commit comments