mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 16:49:18 -05:00
42b71d82db
Co-authored-by: David Sherret <dsherret@gmail.com>
18 lines
419 B
TypeScript
18 lines
419 B
TypeScript
import value from "npm:@denotest/MixedCase";
|
|
console.log(value);
|
|
console.log(pathExists("./node_modules/.deno"));
|
|
console.log(
|
|
pathExists("./node_modules/.deno/_ibsgk3tporsxg5bpinavaskuifgfg@1.0.0"),
|
|
);
|
|
|
|
function pathExists(filePath: string) {
|
|
try {
|
|
Deno.lstatSync(filePath);
|
|
return true;
|
|
} catch (error) {
|
|
if (error instanceof Deno.errors.NotFound) {
|
|
return false;
|
|
}
|
|
throw error;
|
|
}
|
|
}
|