mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Refactor: new write strategy (#58)
This commit is contained in:
@@ -60,6 +60,17 @@ export function withBannerArray(title: string, description: string[] | readonly
|
||||
];
|
||||
};
|
||||
|
||||
export function notSupported(name: string) {
|
||||
return (...args: unknown[]) => {
|
||||
console.error(`${name}: not supported.`, args);
|
||||
throw new Error(`${name}: not implemented.`);
|
||||
};
|
||||
}
|
||||
|
||||
export function withIdentityContent(title: string, description: string[] | readonly string[], date: Date, content: string[]) {
|
||||
return content;
|
||||
};
|
||||
|
||||
export function isDirectoryEmptySync(path: PathLike) {
|
||||
const directoryHandle = fs.opendirSync(path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user