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.
10 lines
401 B
JavaScript
10 lines
401 B
JavaScript
"use strict";
|
|
|
|
const parseIECBytes = require("../parse-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;
|
|
};
|