datasquirel/package-shared/shell/functions/jsonToBase64.ts

9 lines
245 B
TypeScript
Raw Normal View History

2025-01-10 19:10:28 +00:00
import fs from "fs";
import path from "path";
2024-12-06 10:31:24 +00:00
const jsonFile = path.resolve(__dirname, "../../jsonData/userPriviledges.json");
const base64File = Buffer.from(fs.readFileSync(jsonFile, "utf8")).toString(
"base64"
);
console.log(base64File);