pacc 6.6.0 → 6.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,6 +47,7 @@ const result = getAttribute({ a: [0,{ b: 4 }]}, "a[1].b");
47
47
  * [name\_attribute](#name_attribute)
48
48
  * [name\_attribute\_writable](#name_attribute_writable)
49
49
  * [email\_attribute](#email_attribute)
50
+ * [version\_attribute](#version_attribute)
50
51
  * [version\_attribute\_writable](#version_attribute_writable)
51
52
  * [description\_attribute](#description_attribute)
52
53
  * [boolean\_attribute](#boolean_attribute)
@@ -263,6 +264,10 @@ Type: [AttributeDefinition](#attributedefinition)
263
264
 
264
265
  Type: [AttributeDefinition](#attributedefinition)
265
266
 
267
+ ## version\_attribute
268
+
269
+ Type: [AttributeDefinition](#attributedefinition)
270
+
266
271
  ## version\_attribute\_writable
267
272
 
268
273
  Type: [AttributeDefinition](#attributedefinition)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "6.6.0",
3
+ "version": "6.6.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
package/src/bytes.mjs CHANGED
@@ -15,9 +15,12 @@ const byteSizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
15
15
  const units = {
16
16
  b: 1,
17
17
  bytes: 1,
18
+ k: 1024,
18
19
  kb: 1024,
20
+ m: 1024 * 1024,
19
21
  mb: 1024 * 1024,
20
22
  gb: 1024 * 1024 * 1024,
23
+ g: 1024 * 1024 * 1024,
21
24
  tb: 1024 * 1024 * 1024 * 1024
22
25
  };
23
26
 
@@ -34,7 +37,7 @@ export function parseBytes(value) {
34
37
  const v = parseFloat(match[1]);
35
38
 
36
39
  if (match[2]) {
37
- bytes += v * units[match[2]];
40
+ bytes += v * units[match[2].toLocaleLowerCase()];
38
41
  } else {
39
42
  bytes += v;
40
43
  }