blob: aeb1381c0cfb764096b8e2f2740d58aa5f38471f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { TreeEntry as NodeGitTreeEntry } from "nodegit";
export class Blob {
private _ng_tree_entry: NodeGitTreeEntry;
constructor(entry: NodeGitTreeEntry) {
this._ng_tree_entry = entry;
}
public async content(): Promise<string> {
return this._ng_tree_entry.isBlob() ? (await this._ng_tree_entry.getBlob()).toString() : "";
}
}
|