Add data management, randomized HTML drip and public README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3671019e60
commit
f5d8ca7484
46 files changed
+1601
-172
No files matched your search
@@ -15,5 +15,14 @@ public static class Formatting
|
||||
? string.Concat(countryCode.ToUpperInvariant().Select(c => char.ConvertFromUtf32(0x1F1E6 + c - 'A')))
|
||||
: "";
|
||||
|
||||
public static string Bytes(long? bytes) => bytes switch
|
||||
{
|
||||
null => "–",
|
||||
>= 1024 * 1024 * 1024 => $"{bytes / (1024d * 1024 * 1024):0.0} GB",
|
||||
>= 1024 * 1024 => $"{bytes / (1024d * 1024):0.0} MB",
|
||||
>= 1024 => $"{bytes / 1024d:0} KB",
|
||||
_ => $"{bytes} B"
|
||||
};
|
||||
|
||||
public static string? Provider(long? asn, string? provider) => asn is null ? provider : $"AS{asn} {provider}".TrimEnd();
|
||||
}
|
||||
Reference in new issue
Block a user