X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/6cd62e795e3716aa0cbd2d1ff8c1b3a345803563..f6a545b00a4046879b7cc25c06c37bb6b6880b43:/lib/utils.js?ds=inline diff --git a/lib/utils.js b/lib/utils.js index 25d204a..cee3f47 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -3,7 +3,7 @@ import { kFileNotFoundError } from './constants.js'; // File system utilities -export async function rmIfExists(location) { +export const rmIfExists = async function rmIfExists(location) { try { await access(location, constants.F_OK); @@ -16,9 +16,9 @@ export async function rmIfExists(location) { throw error; } -} +}; -export async function ensureDirectoryExists(directory) { +export const ensureDirectoryExists = async function ensureDirectoryExists(directory) { try { await access(directory); @@ -31,4 +31,4 @@ export async function ensureDirectoryExists(directory) { throw error; } -} +};