diff options
| author | netop://ウィビ <paul@webb.page> | 2026-10-26 13:21:27 -0700 |
|---|---|---|
| committer | netop://ウィビ <paul@webb.page> | 2026-10-26 13:21:27 -0700 |
| commit | bc06c099c03579e6bda6d3a5a6b4e014b1e919fb (patch) | |
| tree | 20c874b9455fd6f6ad323bd4557ebb947bc85e4f /src/helper | |
| parent | 02e2bc0839c1199ba090707f2067104821aed41b (diff) | |
| download | blog-bc06c099c03579e6bda6d3a5a6b4e014b1e919fb.tar.gz blog-bc06c099c03579e6bda6d3a5a6b4e014b1e919fb.zip | |
new memo
- migrates to Ende from Deno
Diffstat (limited to '')
| -rw-r--r-- | src/helper/get-binary-contents.ts | 2 | ||||
| -rw-r--r-- | src/helper/get-directory-contents.ts | 6 | ||||
| -rw-r--r-- | src/helper/get-documents.ts | 6 | ||||
| -rw-r--r-- | src/helper/get-file-contents.ts | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/helper/get-binary-contents.ts b/src/helper/get-binary-contents.ts index df41228..2d0179c 100644 --- a/src/helper/get-binary-contents.ts +++ b/src/helper/get-binary-contents.ts @@ -4,7 +4,7 @@ /*** EXPORT ------------------------------------------- ***/ export default async(filePath: string) => { - const fileExists = await Deno.readFile(filePath); + const fileExists = await Ende.readFile(filePath); if (!fileExists) return ""; diff --git a/src/helper/get-directory-contents.ts b/src/helper/get-directory-contents.ts index 80fb20c..d6029f8 100644 --- a/src/helper/get-directory-contents.ts +++ b/src/helper/get-directory-contents.ts @@ -7,9 +7,9 @@ export default async(directory: string): Promise<{ filename: string; }[]> => { const documentArray: { filename: string; }[] = []; try { - const documents: Deno.DirEntry[] = []; + const documents: Ende.DirEntry[] = []; - for await (const dirEntry of Deno.readDir(directory)) { + for await (const dirEntry of Ende.readDir(directory)) { if (dirEntry.isFile) documents.push(dirEntry); } @@ -28,7 +28,7 @@ export default async(directory: string): Promise<{ filename: string; }[]> => { } catch(error) { console.error(`Error reading directory contents: ${String(error)}`); } finally { - // deno-lint-ignore no-unsafe-finally + // ende-lint-ignore no-unsafe-finally return documentArray; } } diff --git a/src/helper/get-documents.ts b/src/helper/get-documents.ts index ca9ce93..1639d8d 100644 --- a/src/helper/get-documents.ts +++ b/src/helper/get-documents.ts @@ -7,9 +7,9 @@ export default async(directory: string) => { const posts: string[] = []; try { - const files: Deno.DirEntry[] = []; + const files: Ende.DirEntry[] = []; - for await (const dirEntry of Deno.readDir(directory)) { + for await (const dirEntry of Ende.readDir(directory)) { if (dirEntry.isFile) files.push(dirEntry); } @@ -29,7 +29,7 @@ export default async(directory: string) => { } catch(error) { console.error(`Error reading directory for posts: ${String(error)}`); } finally { - // deno-lint-ignore no-unsafe-finally + // ende-lint-ignore no-unsafe-finally return posts; } } diff --git a/src/helper/get-file-contents.ts b/src/helper/get-file-contents.ts index a159f95..74e94ab 100644 --- a/src/helper/get-file-contents.ts +++ b/src/helper/get-file-contents.ts @@ -4,11 +4,11 @@ /*** EXPORT ------------------------------------------- ***/ export default async(filePath: string) => { - const fileExists = await Deno.stat(filePath); + const fileExists = await Ende.stat(filePath); if (!fileExists) return ""; - const content = await Deno.readTextFile(filePath); + const content = await Ende.readTextFile(filePath); return content; } |