@utiliread/primitives 1.0.0-126 → 1.0.0-128

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/dist/index.mjs CHANGED
@@ -21,6 +21,31 @@ function $parcel$exportWildcard(dest, source) {
21
21
  function $parcel$export(e, n, v, s) {
22
22
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
23
23
  }
24
+ // We need these to get their namespaces exported
25
+ var $418980adffb511a3$export$c7835fd8b8ca1d68;
26
+ (function(Medium) {
27
+ function isMedium(input) {
28
+ if (input === "none" || input === "all") return true;
29
+ const ALL_MEDIUMS = [
30
+ "heat",
31
+ "water",
32
+ "cooling",
33
+ "electricity",
34
+ "infrastructure"
35
+ ];
36
+ return Array.isArray(input) ? !input.some((x)=>!ALL_MEDIUMS.includes(x)) : ALL_MEDIUMS.includes(input);
37
+ }
38
+ Medium.isMedium = isMedium;
39
+ function isMeter(medium) {
40
+ return medium.includes("heat") || medium.includes("water") || medium.includes("cooling") || medium.includes("electricity");
41
+ }
42
+ Medium.isMeter = isMeter;
43
+ function isFlowMeter(medium) {
44
+ return medium.includes("heat") || medium.includes("water") || medium.includes("cooling");
45
+ }
46
+ Medium.isFlowMeter = isFlowMeter;
47
+ })($418980adffb511a3$export$c7835fd8b8ca1d68 || ($418980adffb511a3$export$c7835fd8b8ca1d68 = {}));
48
+
24
49
 
25
50
  // This is clearly not correct but it provides some amazing type safety
26
51
  function $f5b26f75dc394ede$export$b340a19a1bcc0afd(repoOrTeam, name) {
@@ -28,11 +53,9 @@ function $f5b26f75dc394ede$export$b340a19a1bcc0afd(repoOrTeam, name) {
28
53
  if (!$f5b26f75dc394ede$export$b340a19a1bcc0afd.isRepository(repo)) throw new TypeError("Invalid repository format");
29
54
  return repo;
30
55
  }
31
- const $f5b26f75dc394ede$var$PART_REGEX = new RegExp(/[a-z][a-z0-9-]*/);
32
56
  (function(Repository) {
33
57
  function isRepository(input) {
34
- const parts = input.split("/");
35
- return parts.length === 2 && !parts.some((x)=>!$f5b26f75dc394ede$var$PART_REGEX.test(x));
58
+ return /^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(input);
36
59
  }
37
60
  Repository.isRepository = isRepository;
38
61
  function split(repo) {
@@ -3121,5 +3144,5 @@ const $149c1bd638913645$export$c8dd55bfce1823e7 = {
3121
3144
  };
3122
3145
 
3123
3146
 
3124
- export {$149c1bd638913645$export$c8dd55bfce1823e7 as registers, $3742b95f8d2fe1ca$export$7ed5ca4f8b987938 as DayOfWeek, $3742b95f8d2fe1ca$export$fd55ce593607084a as Step, $a27da276f4185ebf$export$cc77c4ff7e8673c5 as NumberFormatter, $a27da276f4185ebf$export$18a249acfd29a1c5 as invariantDecimalSeparator, $a27da276f4185ebf$export$c146a453a9d3226d as localeDecimalSeparator, $946bd2ae5d426d5a$export$d80dad7287a3f49 as BreakdownRule, $47133f938ce44539$export$60b023dc4cb7008e as PrecisionNumber, $e341043498f0791b$export$8cc0a4f27499ddb4 as RegisterConvention, $2bc946b609f83430$export$472902705794cfbb as RegisterLibrary, $f5b26f75dc394ede$export$b340a19a1bcc0afd as Repository, $a9d41af0df0fca9e$export$35b5ee117d2b7df0 as TimeOrRule, $861601f61ea664fa$re_export$Duration as __Duration};
3147
+ export {$149c1bd638913645$export$c8dd55bfce1823e7 as registers, $3742b95f8d2fe1ca$export$7ed5ca4f8b987938 as DayOfWeek, $3742b95f8d2fe1ca$export$fd55ce593607084a as Step, $a27da276f4185ebf$export$cc77c4ff7e8673c5 as NumberFormatter, $a27da276f4185ebf$export$18a249acfd29a1c5 as invariantDecimalSeparator, $a27da276f4185ebf$export$c146a453a9d3226d as localeDecimalSeparator, $946bd2ae5d426d5a$export$d80dad7287a3f49 as BreakdownRule, $418980adffb511a3$export$c7835fd8b8ca1d68 as Medium, $47133f938ce44539$export$60b023dc4cb7008e as PrecisionNumber, $e341043498f0791b$export$8cc0a4f27499ddb4 as RegisterConvention, $2bc946b609f83430$export$472902705794cfbb as RegisterLibrary, $f5b26f75dc394ede$export$b340a19a1bcc0afd as Repository, $a9d41af0df0fca9e$export$35b5ee117d2b7df0 as TimeOrRule, $861601f61ea664fa$re_export$Duration as __Duration};
3125
3148
  //# sourceMappingURL=index.mjs.map