add other languages

This commit is contained in:
Fabrice Lamant
2024-07-30 20:07:29 +02:00
parent e575c5606b
commit 99fa4cdf66
6864 changed files with 1484485 additions and 9209 deletions

11
src/io.ts Normal file
View File

@ -0,0 +1,11 @@
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
export const saveFile = (path: string, content: string): void => {
const folder = path.split("/").slice(0, -1).join("/");
mkdirSync(folder, { recursive: true });
writeFileSync(path, content);
};
export const hasFile = (path: string) => existsSync(path);
export const readFile = (path: string) => readFileSync(path, "utf-8");