@utiliread/primitives 1.0.0-64 → 1.0.0-66

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.
@@ -1,20 +1,20 @@
1
- import { expect } from "chai";
2
- import { Repository } from "./repository";
3
-
4
- describe("ctor", () => {
5
- it("creates", () => {
6
- expect(Repository("gpkv", "gjoel")).to.equal("gpkv/gjoel");
7
- expect(Repository("gpkv/gjoel")).to.equal("gpkv/gjoel");
8
- });
9
- it("throws if wrong format", () => {
10
- expect(() => Repository("invalid")).to.throw();
11
- })
12
- });
13
-
14
- describe("split", () => {
15
- it("splits into correct parts", () => {
16
- const { team, name } = Repository.split(Repository("gpkv", "gjoel"));
17
- expect(team).to.equal("gpkv");
18
- expect(name).to.equal("gjoel");
19
- });
20
- });
1
+ import { expect } from "chai";
2
+ import { Repository } from "./repository";
3
+
4
+ describe("ctor", () => {
5
+ it("creates", () => {
6
+ expect(Repository("gpkv", "gjoel")).to.equal("gpkv/gjoel");
7
+ expect(Repository("gpkv/gjoel")).to.equal("gpkv/gjoel");
8
+ });
9
+ it("throws if wrong format", () => {
10
+ expect(() => Repository("invalid")).to.throw();
11
+ })
12
+ });
13
+
14
+ describe("split", () => {
15
+ it("splits into correct parts", () => {
16
+ const { team, name } = Repository.split(Repository("gpkv", "gjoel"));
17
+ expect(team).to.equal("gpkv");
18
+ expect(name).to.equal("gjoel");
19
+ });
20
+ });
package/src/unit-id.ts CHANGED
@@ -1,126 +1,126 @@
1
- export type UnitId =
2
- "unitless" |
3
-
4
- "milliWattHour" |
5
- "wattHour" |
6
- "kiloWattHour" |
7
- "megaWattHour" |
8
- "gigaWattHour" |
9
- "calorie" |
10
- "kiloCalorie" |
11
- "megaCalorie" |
12
-
13
- "joule" |
14
- "kiloJoule" |
15
- "megaJoule" |
16
- "gigaJoule" |
17
-
18
- "liter" |
19
- "cubicMeter" |
20
-
21
- "fluidOunce" |
22
- "gallon" |
23
-
24
- "gram" |
25
- "kiloGram" |
26
- "tonne" |
27
-
28
- "ounce" |
29
- "pound" |
30
- "ton" |
31
-
32
- "second" |
33
- "minute" |
34
- "hour" |
35
- "day" |
36
- "week" |
37
- "month" |
38
- "year" |
39
-
40
- "milliWatt" |
41
- "milliWatt2" |
42
- "watt" |
43
- "watt2" |
44
- "kiloWatt" |
45
- "kiloWatt2" |
46
- "megaWatt" |
47
- "megaWatt2" |
48
- "gigaWatt" |
49
- "gigaWatt2" |
50
-
51
- "joulesPerSecond" |
52
- "joulesPerSecond2" |
53
- "joulesPerMinute" |
54
- "joulesPerMinute2" |
55
- "joulesPerHour" |
56
- "joulesPerHour2" |
57
-
58
- "litersPerSecond" |
59
- "litersPerSecond2" |
60
- "litersPerMinute" |
61
- "litersPerMinute2" |
62
- "litersPerHour" |
63
- "litersPerHour2" |
64
-
65
- "cubicMetersPerSecond" |
66
- "cubicMetersPerSecond2" |
67
- "cubicMetersPerMinute" |
68
- "cubicMetersPerMinute2" |
69
- "cubicMetersPerHour" |
70
- "cubicMetersPerHour2" |
71
-
72
- "fluidOuncesPerSecond" |
73
- "fluidOuncesPerSecond2" |
74
- "fluidOuncesPerMinute" |
75
- "fluidOuncesPerMinute2" |
76
- "fluidOuncesPerHour" |
77
- "fluidOuncesPerHour2" |
78
-
79
- "gallonsPerSecond" |
80
- "gallonsPerSecond2" |
81
- "gallonsPerMinute" |
82
- "gallonsPerMinute2" |
83
- "gallonsPerHour" |
84
- "gallonsPerHour2" |
85
-
86
- "gramsPerSecond" |
87
- "gramsPerSecond2" |
88
- "gramsPerMinute" |
89
- "gramsPerMinute2" |
90
- "gramsPerHour" |
91
- "gramsPerHour2" |
92
-
93
- "kiloGramsPerSecond" |
94
- "kiloGramsPerSecond2" |
95
- "kiloGramsPerMinute" |
96
- "kiloGramsPerMinute2" |
97
- "kiloGramsPerHour" |
98
- "kiloGramsPerHour2" |
99
-
100
- "celcius" |
101
- "kelvin" |
102
- "fahrenheit" |
103
-
104
- "var" |
105
- "kiloVar" |
106
- "megaVar" |
107
-
108
- "varHour" |
109
- "kiloVarHour" |
110
- "megaVarHour" |
111
-
112
- "percentage" |
113
-
114
- "literCelcius" |
115
- "cubicMeterCelcius";
116
-
117
- export const energyUnits: UnitId[] = [
118
- "milliWattHour",
119
- "wattHour",
120
- "kiloWattHour",
121
- "megaWattHour",
122
- "gigaWattHour",
123
- "calorie",
124
- "kiloCalorie",
125
- "megaCalorie",
126
- ];
1
+ export type UnitId =
2
+ "unitless" |
3
+
4
+ "milliWattHour" |
5
+ "wattHour" |
6
+ "kiloWattHour" |
7
+ "megaWattHour" |
8
+ "gigaWattHour" |
9
+ "calorie" |
10
+ "kiloCalorie" |
11
+ "megaCalorie" |
12
+
13
+ "joule" |
14
+ "kiloJoule" |
15
+ "megaJoule" |
16
+ "gigaJoule" |
17
+
18
+ "liter" |
19
+ "cubicMeter" |
20
+
21
+ "fluidOunce" |
22
+ "gallon" |
23
+
24
+ "gram" |
25
+ "kiloGram" |
26
+ "tonne" |
27
+
28
+ "ounce" |
29
+ "pound" |
30
+ "ton" |
31
+
32
+ "second" |
33
+ "minute" |
34
+ "hour" |
35
+ "day" |
36
+ "week" |
37
+ "month" |
38
+ "year" |
39
+
40
+ "milliWatt" |
41
+ "milliWatt2" |
42
+ "watt" |
43
+ "watt2" |
44
+ "kiloWatt" |
45
+ "kiloWatt2" |
46
+ "megaWatt" |
47
+ "megaWatt2" |
48
+ "gigaWatt" |
49
+ "gigaWatt2" |
50
+
51
+ "joulesPerSecond" |
52
+ "joulesPerSecond2" |
53
+ "joulesPerMinute" |
54
+ "joulesPerMinute2" |
55
+ "joulesPerHour" |
56
+ "joulesPerHour2" |
57
+
58
+ "litersPerSecond" |
59
+ "litersPerSecond2" |
60
+ "litersPerMinute" |
61
+ "litersPerMinute2" |
62
+ "litersPerHour" |
63
+ "litersPerHour2" |
64
+
65
+ "cubicMetersPerSecond" |
66
+ "cubicMetersPerSecond2" |
67
+ "cubicMetersPerMinute" |
68
+ "cubicMetersPerMinute2" |
69
+ "cubicMetersPerHour" |
70
+ "cubicMetersPerHour2" |
71
+
72
+ "fluidOuncesPerSecond" |
73
+ "fluidOuncesPerSecond2" |
74
+ "fluidOuncesPerMinute" |
75
+ "fluidOuncesPerMinute2" |
76
+ "fluidOuncesPerHour" |
77
+ "fluidOuncesPerHour2" |
78
+
79
+ "gallonsPerSecond" |
80
+ "gallonsPerSecond2" |
81
+ "gallonsPerMinute" |
82
+ "gallonsPerMinute2" |
83
+ "gallonsPerHour" |
84
+ "gallonsPerHour2" |
85
+
86
+ "gramsPerSecond" |
87
+ "gramsPerSecond2" |
88
+ "gramsPerMinute" |
89
+ "gramsPerMinute2" |
90
+ "gramsPerHour" |
91
+ "gramsPerHour2" |
92
+
93
+ "kiloGramsPerSecond" |
94
+ "kiloGramsPerSecond2" |
95
+ "kiloGramsPerMinute" |
96
+ "kiloGramsPerMinute2" |
97
+ "kiloGramsPerHour" |
98
+ "kiloGramsPerHour2" |
99
+
100
+ "celcius" |
101
+ "kelvin" |
102
+ "fahrenheit" |
103
+
104
+ "var" |
105
+ "kiloVar" |
106
+ "megaVar" |
107
+
108
+ "varHour" |
109
+ "kiloVarHour" |
110
+ "megaVarHour" |
111
+
112
+ "percentage" |
113
+
114
+ "literCelcius" |
115
+ "cubicMeterCelcius";
116
+
117
+ export const energyUnits: UnitId[] = [
118
+ "milliWattHour",
119
+ "wattHour",
120
+ "kiloWattHour",
121
+ "megaWattHour",
122
+ "gigaWattHour",
123
+ "calorie",
124
+ "kiloCalorie",
125
+ "megaCalorie",
126
+ ];