mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-04 16:33:56 +08:00
🐶 Sync 2026-10-08 01:07:04
This commit is contained in:
1 parent
31f25ca6cb
commit
ef5af2e0cc
283 files changed
+34710
-16084
No files matched your search
@@ -488,7 +488,7 @@ const dv = view.extend({
|
||||
|
||||
parseMemory(value) {
|
||||
if (!value) return 0;
|
||||
const rex = /^([0-9.]+) *([bkmgt])?i? *[Bb]?/i;
|
||||
const rex = /^([0-9.]+) *([bkmgtp])?i? *[Bb]?/i;
|
||||
let [, amount, unit] = rex.exec(value.toLowerCase());
|
||||
amount = amount ? Number.parseFloat(amount) : 0;
|
||||
switch (unit) {
|
||||
|
||||
Reference in new issue
Block a user