Format trace diagnostics helpers
Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
da81532386
commit
c7683bc8f7
1 file changed
+2
-6
@@ -88,15 +88,11 @@ function isRecordObject(value: unknown): value is Readonly<Record<string, unknow
|
||||
}
|
||||
|
||||
function toStringValue(value: unknown): Option.Option<string> {
|
||||
return typeof value === "string" && value.trim().length > 0
|
||||
? Option.some(value)
|
||||
: Option.none();
|
||||
return typeof value === "string" && value.trim().length > 0 ? Option.some(value) : Option.none();
|
||||
}
|
||||
|
||||
function toNumberValue(value: unknown): Option.Option<number> {
|
||||
return typeof value === "number" && Number.isFinite(value)
|
||||
? Option.some(value)
|
||||
: Option.none();
|
||||
return typeof value === "number" && Number.isFinite(value) ? Option.some(value) : Option.none();
|
||||
}
|
||||
|
||||
function unixNanoToDateTime(value: unknown): Option.Option<DateTime.Utc> {
|
||||
|
||||
Reference in new issue
Block a user