mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-20 04:14:12 +01:00
feat: meta section
This commit is contained in:
1 parent
1d3cb95b89
commit
40a1eb861d
14 files changed
+141
-18
No files matched your search
@@ -7,6 +7,8 @@ export function renderCharacteristic(
|
||||
): string | null {
|
||||
if (characteristic === null) return null;
|
||||
|
||||
if (config.render) return config.render(characteristic);
|
||||
|
||||
if (typeof characteristic === "number") {
|
||||
if (Number.isFinite(characteristic)) {
|
||||
if (config.decimals === undefined) {
|
||||
@@ -19,5 +21,9 @@ export function renderCharacteristic(
|
||||
return `${characteristic < 0 ? "-" : ""}∞`;
|
||||
}
|
||||
|
||||
if (typeof characteristic === "string") {
|
||||
return characteristic;
|
||||
}
|
||||
|
||||
return characteristic.map((c) => renderCharacteristic(c, config)).join(", ");
|
||||
}
|
||||
Reference in new issue
Block a user