diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-06-14 01:21:11 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-06-14 02:53:17 +0800 |
commit | 4f47b123f26d356661702b3d77c5c246be8620d0 (patch) | |
tree | aab52a08c3544b7514d24d68e7127f9aaba76057 | |
parent | 0ddd1dc07f7d00723933d832562497af23dce225 (diff) | |
download | crupest-4f47b123f26d356661702b3d77c5c246be8620d0.tar.gz crupest-4f47b123f26d356661702b3d77c5c246be8620d0.tar.bz2 crupest-4f47b123f26d356661702b3d77c5c246be8620d0.zip |
deno: merge utils to one file.
-rw-r--r-- | deno/base/config.ts | 2 | ||||
-rw-r--r-- | deno/base/deno.json | 3 | ||||
-rw-r--r-- | deno/base/lib.ts (renamed from deno/base/date.ts) | 4 | ||||
-rw-r--r-- | deno/base/log.ts | 2 | ||||
-rw-r--r-- | deno/base/text.ts | 3 | ||||
-rw-r--r-- | deno/mail-relay/aws/fetch.ts | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/deno/base/config.ts b/deno/base/config.ts index 8fce1d8..a5f5d86 100644 --- a/deno/base/config.ts +++ b/deno/base/config.ts @@ -1,4 +1,4 @@ -import { camelCaseToKebabCase } from "./text.ts"; +import { camelCaseToKebabCase } from "./lib.ts"; export interface ConfigDefinitionItem { readonly description: string; diff --git a/deno/base/deno.json b/deno/base/deno.json index 2c2d550..dabc02a 100644 --- a/deno/base/deno.json +++ b/deno/base/deno.json @@ -2,10 +2,9 @@ "name": "@crupest/base", "version": "0.1.0", "exports": { + ".": "./lib.ts", "./config": "./config.ts", "./cron": "./cron.ts", - "./date": "./date.ts", - "./text": "./text.ts", "./log": "./log.ts" } } diff --git a/deno/base/date.ts b/deno/base/lib.ts index e65691e..a5e4a6a 100644 --- a/deno/base/date.ts +++ b/deno/base/lib.ts @@ -1,3 +1,7 @@ +export function camelCaseToKebabCase(str: string): string { + return str.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase()); +} + export function toFileNameString(date: Date, dateOnly?: boolean): string { const str = date.toISOString(); return dateOnly === true diff --git a/deno/base/log.ts b/deno/base/log.ts index bfd5fae..940f569 100644 --- a/deno/base/log.ts +++ b/deno/base/log.ts @@ -1,6 +1,6 @@ import { join } from "@std/path"; -import { toFileNameString } from "./date.ts"; +import { toFileNameString } from "./lib.ts"; export interface ExternalLogStream extends Disposable { stream: WritableStream; diff --git a/deno/base/text.ts b/deno/base/text.ts deleted file mode 100644 index f3e4020..0000000 --- a/deno/base/text.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function camelCaseToKebabCase(str: string): string { - return str.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase()); -} diff --git a/deno/mail-relay/aws/fetch.ts b/deno/mail-relay/aws/fetch.ts index bbb671a..68e02e6 100644 --- a/deno/mail-relay/aws/fetch.ts +++ b/deno/mail-relay/aws/fetch.ts @@ -7,7 +7,7 @@ import { S3ClientConfig, } from "@aws-sdk/client-s3"; -import { toFileNameString } from "@crupest/base/date"; +import { toFileNameString } from "@crupest/base"; import { Mail } from "../mail.ts"; |