file.exists() needs to be awaited to get the value (#5061)

This commit is contained in:
amt8u
2023-09-13 14:11:18 +05:30
committed by GitHub
parent 6161c201e1
commit 878b473085

View File

@@ -8,7 +8,7 @@ The `Bun.file()` function accepts a path and returns a `BunFile` instance. Use t
const path = "/path/to/package.json";
const file = Bun.file(path);
file.exists(); // boolean;
await file.exists(); // boolean;
```
---