Skip to content

Commit 33d8ea4

Browse files
committed
feat: allow to use toString() on readFile output
1 parent e530b68 commit 33d8ea4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/DefaultBackend.js

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ module.exports = class DefaultBackend {
119119
}
120120
if (encoding === "utf8") {
121121
data = decode(data);
122+
} else {
123+
data.toString = () => decode(data);
122124
}
123125
}
124126
if (!stat) throw new ENOENT(filepath)

0 commit comments

Comments
 (0)