You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
393 B
JavaScript
9 lines
393 B
JavaScript
6 years ago
|
"use strict";
|
||
|
|
||
|
const parseIECBytes = require("./bytes/iec");
|
||
|
|
||
|
/* NOTE: This parsing module is for a special case; values that are normally handled using the Linux kernel's `memparse` function (which parses memory suffixes like K, M, G, etc.) but that do *not* semantically represent bytes. */
|
||
|
|
||
|
module.exports = function parseMemparseValue(value) {
|
||
|
return parseIECBytes(value).toB().amount;
|
||
|
};
|