summaryrefslogtreecommitdiff
path: root/src/helper/get-file-contents.ts
blob: a159f95a7f8838eabcc39cf5d0056ec0c47ec50d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*** EXPORT ------------------------------------------- ***/

export default async(filePath: string) => {
  const fileExists = await Deno.stat(filePath);

  if (!fileExists)
    return "";

  const content = await Deno.readTextFile(filePath);
  return content;
}