search in desc, input and output
This commit is contained in:
1 parent
5e6f177132
commit
4022f268e5
5 files changed
+69
-12
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import * as fs from "fs";
|
||||
|
||||
export const readJson = (path: string) => {
|
||||
const str = fs.readFileSync(path, "utf-8");
|
||||
return JSON.parse(str);
|
||||
};
|
||||
|
||||
export const writeJson = (path: string, data: any) => {
|
||||
const str = JSON.stringify(data, undefined, 2);
|
||||
fs.writeFileSync(path, str, "utf-8");
|
||||
};
|
||||
|
||||
export function mergeClassNames(...cls: string[]): string {
|
||||
return cls.filter((v) => !!v).join(" ");
|
||||
}
|
||||
Reference in new issue
Block a user