mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
50ce74a9d0
commit
c27005a18b
1 file changed
+1
-1
@@ -22,7 +22,7 @@ const unitRegex = /(?<value>[0-9]+(\.[0-9]*)?)(?<suffix>(B|[KMGTP]iB?))?/;
|
||||
|
||||
type BinaryUnit = typeof magnitudes extends Map<infer Key, any> ? Key : never;
|
||||
|
||||
export function unitsToBytes(value: string): number | bigint {
|
||||
export function unitsToBytes(value: string): number {
|
||||
const unitsMatch = value.match(unitRegex);
|
||||
|
||||
if (!unitsMatch?.groups) {
|
||||
|
||||
Reference in new issue
Block a user