diff options
Diffstat (limited to 'packages/taler-util/src/compat.node.ts')
-rw-r--r-- | packages/taler-util/src/compat.node.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/taler-util/src/compat.node.ts b/packages/taler-util/src/compat.node.ts index fb2db2995..2f78c9346 100644 --- a/packages/taler-util/src/compat.node.ts +++ b/packages/taler-util/src/compat.node.ts @@ -18,6 +18,7 @@ import process from "node:process"; import readline from "node:readline"; import path from "node:path"; import os from "node:os"; +import fs from "node:fs"; export function processExit(status: number): never { process.exit(status); @@ -57,3 +58,7 @@ export function setUnhandledRejectionHandler(h: (e: any) => void): void { export function getenv(name: string): string | undefined { return process.env[name]; } + +export function readFile(fileName: string): string { + return fs.readFileSync(fileName, "utf-8"); +} |