engineering-unit-converter 0.0.2 → 0.0.4
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 +1 -1
- package/dist/converter.d.ts +0 -13
- package/dist/engineering-unit-converter.js +60 -43
- package/dist/engineering-unit-converter.umd.cjs +1 -1
- package/dist/internalConverter.d.ts +12 -0
- package/dist/publicConverter.d.ts +14 -0
- package/dist/units/acceleration.d.ts +5 -7
- package/dist/units/area.d.ts +5 -7
- package/dist/units/density.d.ts +5 -7
- package/dist/units/electric-charge.d.ts +5 -7
- package/dist/units/electric-current.d.ts +5 -7
- package/dist/units/energy.d.ts +5 -7
- package/dist/units/force.d.ts +5 -7
- package/dist/units/length.d.ts +5 -7
- package/dist/units/mass-flow.d.ts +5 -7
- package/dist/units/mass.d.ts +5 -7
- package/dist/units/power.d.ts +5 -7
- package/dist/units/pressure-manometric.d.ts +5 -7
- package/dist/units/pressure.d.ts +5 -7
- package/dist/units/speed.d.ts +5 -7
- package/dist/units/standard-volumetric-flow.d.ts +5 -7
- package/dist/units/surface-tension.d.ts +5 -7
- package/dist/units/time.d.ts +5 -7
- package/dist/units/viscosity.d.ts +5 -7
- package/dist/units/voltage.d.ts +5 -7
- package/dist/units/volume.d.ts +5 -7
- package/dist/units/volumetric-flow.d.ts +5 -7
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/converter.d.ts
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type MeasurementUnits, type Measurement } from './types';
|
|
2
|
-
declare class Converter<T extends Measurement> {
|
|
3
|
-
readonly _definitions: T;
|
|
4
|
-
readonly _val: number;
|
|
5
|
-
_fromUnit: MeasurementUnits<T> | null;
|
|
6
|
-
constructor(numerator: number, _definitions: T);
|
|
7
|
-
from<U extends MeasurementUnits<T>>(fromUnit: U): Converter<T>;
|
|
8
|
-
to<U extends MeasurementUnits<T>>(toUnit: U): number;
|
|
9
|
-
_getUnit(unit: MeasurementUnits<T>): number;
|
|
10
|
-
_checkUnit(unit: MeasurementUnits<T>): void;
|
|
11
|
-
}
|
|
12
|
-
declare const createConverter: <T extends Measurement>(definitions: T) => (val: number) => Converter<T>;
|
|
13
|
-
export default createConverter;
|
|
@@ -27,7 +27,24 @@ class u {
|
|
|
27
27
|
throw new Error(`Invalid unit "${e}". Available units: ${a.join(", ")}`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
class m {
|
|
31
|
+
constructor(e, a) {
|
|
32
|
+
r(this, "_internalConverter");
|
|
33
|
+
this._internalConverter = new u(e, a);
|
|
34
|
+
}
|
|
35
|
+
from(e) {
|
|
36
|
+
return this._internalConverter.from(e), new s(this._internalConverter);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
class s {
|
|
40
|
+
constructor(e) {
|
|
41
|
+
this._internalConverter = e;
|
|
42
|
+
}
|
|
43
|
+
to(e) {
|
|
44
|
+
return this._internalConverter.to(e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const n = (t) => (e) => new m(e, t), i = {
|
|
31
48
|
baseUnit: "m/s²",
|
|
32
49
|
units: {
|
|
33
50
|
"m/s²": {
|
|
@@ -55,7 +72,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
55
72
|
// Conversion factor from m/s² to ft/s²
|
|
56
73
|
}
|
|
57
74
|
}
|
|
58
|
-
},
|
|
75
|
+
}, A = n(i), v = {
|
|
59
76
|
baseUnit: "m2",
|
|
60
77
|
units: {
|
|
61
78
|
m2: {
|
|
@@ -103,7 +120,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
103
120
|
// Conversion factor from m2 to hectare
|
|
104
121
|
}
|
|
105
122
|
}
|
|
106
|
-
},
|
|
123
|
+
}, T = n(v), V = {
|
|
107
124
|
baseUnit: "kg/m3",
|
|
108
125
|
units: {
|
|
109
126
|
"kg/m3": {
|
|
@@ -131,7 +148,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
131
148
|
// Conversion factor from lb/ft³ to lb/m³
|
|
132
149
|
}
|
|
133
150
|
}
|
|
134
|
-
},
|
|
151
|
+
}, N = n(V), p = {
|
|
135
152
|
baseUnit: "C",
|
|
136
153
|
units: {
|
|
137
154
|
C: {
|
|
@@ -159,7 +176,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
159
176
|
// Conversion factor from C to pC
|
|
160
177
|
}
|
|
161
178
|
}
|
|
162
|
-
},
|
|
179
|
+
}, G = n(p), d = {
|
|
163
180
|
baseUnit: "A",
|
|
164
181
|
units: {
|
|
165
182
|
A: {
|
|
@@ -187,7 +204,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
187
204
|
// Conversion factor from A to pA
|
|
188
205
|
}
|
|
189
206
|
}
|
|
190
|
-
},
|
|
207
|
+
}, I = n(d), h = {
|
|
191
208
|
baseUnit: "J",
|
|
192
209
|
units: {
|
|
193
210
|
J: {
|
|
@@ -225,7 +242,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
225
242
|
// Conversion factor from J to BTU
|
|
226
243
|
}
|
|
227
244
|
}
|
|
228
|
-
},
|
|
245
|
+
}, W = n(h), b = {
|
|
229
246
|
baseUnit: "N",
|
|
230
247
|
units: {
|
|
231
248
|
N: {
|
|
@@ -248,7 +265,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
248
265
|
// Conversion factor from N to kgf
|
|
249
266
|
}
|
|
250
267
|
}
|
|
251
|
-
},
|
|
268
|
+
}, B = n(b), g = {
|
|
252
269
|
baseUnit: "m",
|
|
253
270
|
units: {
|
|
254
271
|
mm: {
|
|
@@ -276,7 +293,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
276
293
|
// Conversion factor from m to ft
|
|
277
294
|
}
|
|
278
295
|
}
|
|
279
|
-
},
|
|
296
|
+
}, J = n(g), C = {
|
|
280
297
|
baseUnit: "kg/s",
|
|
281
298
|
units: {
|
|
282
299
|
"kg/s": {
|
|
@@ -327,7 +344,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
327
344
|
// 1 day = 86400 seconds
|
|
328
345
|
}
|
|
329
346
|
}
|
|
330
|
-
},
|
|
347
|
+
}, j = n(C), f = {
|
|
331
348
|
baseUnit: "kg",
|
|
332
349
|
units: {
|
|
333
350
|
kg: {
|
|
@@ -355,7 +372,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
355
372
|
// Conversion factor from kg to ton
|
|
356
373
|
}
|
|
357
374
|
}
|
|
358
|
-
},
|
|
375
|
+
}, H = n(f), M = {
|
|
359
376
|
baseUnit: "W",
|
|
360
377
|
units: {
|
|
361
378
|
W: {
|
|
@@ -383,7 +400,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
383
400
|
// Conversion factor from W to cal/s
|
|
384
401
|
}
|
|
385
402
|
}
|
|
386
|
-
},
|
|
403
|
+
}, O = n(M), y = {
|
|
387
404
|
baseUnit: "Pa",
|
|
388
405
|
units: {
|
|
389
406
|
Pag: {
|
|
@@ -421,7 +438,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
421
438
|
// Conversion factor from Pa to kg/cm²
|
|
422
439
|
}
|
|
423
440
|
}
|
|
424
|
-
},
|
|
441
|
+
}, z = n(y), U = {
|
|
425
442
|
baseUnit: "Pa",
|
|
426
443
|
units: {
|
|
427
444
|
Pa: {
|
|
@@ -459,7 +476,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
459
476
|
// Conversion factor from Pa to kg/cm²
|
|
460
477
|
}
|
|
461
478
|
}
|
|
462
|
-
},
|
|
479
|
+
}, E = n(U), S = {
|
|
463
480
|
baseUnit: "m/s",
|
|
464
481
|
units: {
|
|
465
482
|
"m/s": {
|
|
@@ -497,7 +514,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
497
514
|
// Conversion factor from m/s to ft/h
|
|
498
515
|
}
|
|
499
516
|
}
|
|
500
|
-
},
|
|
517
|
+
}, x = n(S), P = {
|
|
501
518
|
baseUnit: "SCMD",
|
|
502
519
|
units: {
|
|
503
520
|
SCMD: {
|
|
@@ -530,7 +547,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
530
547
|
// Conversion factor from SCMD to MMSCFD
|
|
531
548
|
}
|
|
532
549
|
}
|
|
533
|
-
},
|
|
550
|
+
}, L = n(P), k = {
|
|
534
551
|
baseUnit: "N/m",
|
|
535
552
|
units: {
|
|
536
553
|
"N/m": {
|
|
@@ -553,7 +570,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
553
570
|
// Conversion factor from N/m to mN/m
|
|
554
571
|
}
|
|
555
572
|
}
|
|
556
|
-
},
|
|
573
|
+
}, Q = n(k), w = {
|
|
557
574
|
baseUnit: "s",
|
|
558
575
|
units: {
|
|
559
576
|
s: {
|
|
@@ -576,7 +593,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
576
593
|
// Conversion factor from seconds to days
|
|
577
594
|
}
|
|
578
595
|
}
|
|
579
|
-
},
|
|
596
|
+
}, Y = n(w), _ = {
|
|
580
597
|
baseUnit: "cP",
|
|
581
598
|
units: {
|
|
582
599
|
cP: {
|
|
@@ -609,7 +626,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
609
626
|
// Conversion factor from cP to kg/m·s·m
|
|
610
627
|
}
|
|
611
628
|
}
|
|
612
|
-
},
|
|
629
|
+
}, R = n(_), $ = {
|
|
613
630
|
baseUnit: "V",
|
|
614
631
|
// transform: (val) => val * baseValue,
|
|
615
632
|
units: {
|
|
@@ -626,7 +643,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
626
643
|
convertValue: 1e3
|
|
627
644
|
}
|
|
628
645
|
}
|
|
629
|
-
},
|
|
646
|
+
}, X = n($), K = {
|
|
630
647
|
baseUnit: "m³",
|
|
631
648
|
units: {
|
|
632
649
|
"m³": {
|
|
@@ -659,7 +676,7 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
659
676
|
// Conversion factor from m³ to quarts
|
|
660
677
|
}
|
|
661
678
|
}
|
|
662
|
-
},
|
|
679
|
+
}, Z = n(K), F = {
|
|
663
680
|
baseUnit: "m3/h",
|
|
664
681
|
units: {
|
|
665
682
|
"m3/h": {
|
|
@@ -707,27 +724,27 @@ const n = (t) => (e) => new u(e, t), m = {
|
|
|
707
724
|
// Conversion factor from cubic meter to gallon, assuming 1 hour = 3600 seconds
|
|
708
725
|
}
|
|
709
726
|
}
|
|
710
|
-
},
|
|
727
|
+
}, ee = n(F);
|
|
711
728
|
export {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
729
|
+
A as acceleration,
|
|
730
|
+
T as area,
|
|
731
|
+
N as density,
|
|
732
|
+
G as electricCharge,
|
|
733
|
+
I as electricCurrent,
|
|
734
|
+
W as energy,
|
|
735
|
+
B as force,
|
|
736
|
+
J as length,
|
|
737
|
+
H as mass,
|
|
738
|
+
j as massFlow,
|
|
739
|
+
O as power,
|
|
740
|
+
E as pressure,
|
|
741
|
+
z as pressureManometric,
|
|
742
|
+
x as speed,
|
|
743
|
+
L as standardVolumetricFlow,
|
|
744
|
+
Q as surfaceTension,
|
|
745
|
+
Y as time,
|
|
746
|
+
R as viscosity,
|
|
747
|
+
X as voltage,
|
|
748
|
+
Z as volume,
|
|
749
|
+
ee as volumetricFlow
|
|
733
750
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["engineering-unit-converter"]={}))})(this,function(e){"use strict";var
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["engineering-unit-converter"]={}))})(this,function(e){"use strict";var W=Object.defineProperty;var B=(e,t,o)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var c=(e,t,o)=>(B(e,typeof t!="symbol"?t+"":t,o),o);class t{constructor(n,r){c(this,"_definitions");c(this,"_val");c(this,"_fromUnit",null);this._definitions=r,this._val=n}from(n){return this._checkUnit(n),this._fromUnit=n,this}to(n){if(!this._fromUnit)throw new Error('Please specify the "from" unit using the from() method before calling to().');this._checkUnit(n);const r=this._getUnit(n),I=this._getUnit(this._fromUnit);return this._val*I/r}_getUnit(n){return this._definitions.units[n].convertValue}_checkUnit(n){const r=Object.keys(this._definitions.units);if(!r.includes(n))throw new Error(`Invalid unit "${n}". Available units: ${r.join(", ")}`)}}class o{constructor(n,r){c(this,"_internalConverter");this._internalConverter=new t(n,r)}from(n){return this._internalConverter.from(n),new u(this._internalConverter)}}class u{constructor(n){this._internalConverter=n}to(n){return this._internalConverter.to(n)}}const a=l=>n=>new o(n,l),m=a({baseUnit:"m/s²",units:{"m/s²":{name:"Meter per Second Squared",convertValue:1},"km/s²":{name:"Kilometer per Second Squared",convertValue:1e6},"cm/s²":{name:"Centimeter per Second Squared",convertValue:1e-4},g:{name:"Gravity",convertValue:9.80665},"ft/s²":{name:"Foot per Second Squared",convertValue:.3048}}}),i={baseUnit:"m2",units:{m2:{name:"Square Meter",convertValue:1},km2:{name:"Square Kilometer",convertValue:1/1e-6},cm2:{name:"Square Centimeter",convertValue:1/1e4},mm2:{name:"Square Millimeter",convertValue:1/1e6},sqin:{name:"Square Inch",convertValue:1/1550.0031},sqft:{name:"Square Foot",convertValue:1/10.7639},sqyd:{name:"Square Yard",convertValue:1/1.19599},acre:{name:"Acre",convertValue:1/247105e-9},hectare:{name:"Hectare",convertValue:1/1e-4}}},s=a(i),v={baseUnit:"kg/m3",units:{"kg/m3":{name:"Kilogram per cubic meter",convertValue:1},"lb/ft3":{name:"Pound per cubic foot",convertValue:.0160185},"g/cm3":{name:"Gram per cubic centimeter",convertValue:.001},"kg/ft3":{name:"Kilogram per cubic foot",convertValue:1/16.0185},"lb/m3":{name:"Pound per cubic meter",convertValue:.0160185/1e3}}},V=a(v),d=a({baseUnit:"C",units:{C:{name:"Coulomb",convertValue:1},mC:{name:"MilliCoulomb",convertValue:.001},μC:{name:"MicroCoulomb",convertValue:1e-6},nC:{name:"NanoCoulomb",convertValue:1e-9},pC:{name:"PicoCoulomb",convertValue:1e-12}}}),h=a({baseUnit:"A",units:{A:{name:"Ampere",convertValue:1},mA:{name:"Milliampere",convertValue:.001},μA:{name:"Microampere",convertValue:1e-6},nA:{name:"Nanoampere",convertValue:1e-9},pA:{name:"Picoampere",convertValue:1e-12}}}),p={baseUnit:"J",units:{J:{name:"Joule",convertValue:1},kJ:{name:"Kilojoule",convertValue:1/.001},cal:{name:"Calorie",convertValue:1/.239006},kcal:{name:"Kilocalorie",convertValue:1/239006e-9},Wh:{name:"Watt-hour",convertValue:1/277778e-9},kWh:{name:"Kilowatt-hour",convertValue:1/277778e-12},BTU:{name:"British Thermal Unit",convertValue:1/947817e-9}}},b=a(p),g=a({baseUnit:"N",units:{N:{name:"Newton",convertValue:1},dyn:{name:"Dyne",convertValue:1e-5},lbf:{name:"Pound-force",convertValue:4.44822},kgf:{name:"Kilogram-force",convertValue:9.80665}}}),f=a({baseUnit:"m",units:{mm:{name:"Millimeter",convertValue:.001},cm:{name:"Centimeter",convertValue:.01},m:{name:"Meter",convertValue:1},in:{name:"Inch",convertValue:.0254},ft:{name:"Foot",convertValue:.3048}}}),C={baseUnit:"kg/s",units:{"kg/s":{name:"Kilogram per second",convertValue:1},"kg/h":{name:"Kilogram per hour",convertValue:1/3600},"lb/day":{name:"Pound per day",convertValue:453592e-9*(1/86400)},"g/s":{name:"Gram per second",convertValue:.001},"lb/h":{name:"Pound per hour",convertValue:453592e-9},"ton/day":{name:"Ton per day",convertValue:1e3*(1/86400)},"oz/min":{name:"Ounce per minute",convertValue:.0283495/60},"ton/year":{name:"Ton per year",convertValue:1e3/86400/365},"lb/s":{name:"Pound per second",convertValue:453592e-9},"kg/day":{name:"Kilogram per day",convertValue:1/86400}}},M=a(C),y=a({baseUnit:"kg",units:{kg:{name:"Kilogram",convertValue:1},g:{name:"Gram",convertValue:.001},lb:{name:"Pound",convertValue:.453592},oz:{name:"Ounce",convertValue:.0283495},ton:{name:"Ton",convertValue:1e3}}}),S=a({baseUnit:"W",units:{W:{name:"Watt",convertValue:1},kW:{name:"Kilowatt",convertValue:1e3},hp:{name:"Horsepower",convertValue:745.7},"BTU/h":{name:"British Thermal Unit per hour",convertValue:3.41214},"cal/s":{name:"Calorie per second",convertValue:239.006}}}),U=a({baseUnit:"Pa",units:{Pag:{name:"Pascal",convertValue:1},kPag:{name:"Kilopascal",convertValue:1e3},MPag:{name:"Megapascal",convertValue:1e6},barg:{name:"Bar",convertValue:1e5},atmg:{name:"Atmosphere",convertValue:101325},psig:{name:"Pound per Square Inch",convertValue:6894.76},"kg/cm2g":{name:"Kilogram per Square Centimeter",convertValue:98066.5}}}),P=a({baseUnit:"Pa",units:{Pa:{name:"Pascal",convertValue:1},kPa:{name:"Kilopascal",convertValue:1e3},MPa:{name:"Megapascal",convertValue:1e6},bar:{name:"Bar",convertValue:1e5},atm:{name:"Atmosphere",convertValue:101325},psi:{name:"Pound per Square Inch",convertValue:6894.76},"kg/cm2":{name:"Kilogram per Square Centimeter",convertValue:98066.5}}}),k={baseUnit:"m/s",units:{"m/s":{name:"Meter per second",convertValue:1},"km/h":{name:"Kilometer per hour",convertValue:.277778},"ft/s":{name:"Foot per second",convertValue:.3048},"mi/h":{name:"Mile per hour",convertValue:.44704},knot:{name:"Knot",convertValue:.514444},"m/h":{name:"Meter per hour",convertValue:1/3600},"ft/h":{name:"Foot per hour",convertValue:.3048/3600}}},w=a(k),_={baseUnit:"SCMD",units:{SCMD:{name:"Standard Cubic Meters per Day",convertValue:1},SCFD:{name:"Standard Cubic Feet per Day",convertValue:.00211888},MSCMD:{name:"Million Standard Cubic Meters per Day",convertValue:1e3},MMSCMD:{name:"Million Million Standard Cubic Meters per Day",convertValue:1e6},MSCFD:{name:"Million Standard Cubic Feet per Day",convertValue:.00211888*1e3},MMSCFD:{name:"Million Million Standard Cubic Feet per Day",convertValue:.00211888*1e6}}},$=a(_),K=a({baseUnit:"N/m",units:{"N/m":{name:"Newton per Meter",convertValue:1},"dyn/cm":{name:"Dyne per Centimeter",convertValue:.001},"lbf/ft":{name:"Pound-force per Foot",convertValue:.3048},"mN/m":{name:"Millinewton per Meter",convertValue:.001}}}),F=a({baseUnit:"s",units:{s:{name:"Second",convertValue:1},min:{name:"Minute",convertValue:60},hr:{name:"Hour",convertValue:3600},day:{name:"Day",convertValue:86400}}}),q={baseUnit:"cP",units:{cP:{name:"Centipoise",convertValue:1},"Pa·s":{name:"Pascal second",convertValue:.001},"lb·ft/s·h":{name:"Pound-foot per second-hour",convertValue:241909e-12},"kg/m·s·h":{name:"Kilogram per meter-second-hour",convertValue:.001/3600},"lb·ft/s·ft":{name:"Pound-foot per second-foot",convertValue:241909e-12/3600},"kg/m·s·m":{name:"Kilogram per meter-second-meter",convertValue:.001/3600/3600}}},D=a(q),T=a({baseUnit:"V",units:{V:{name:"Volt",convertValue:1},mV:{name:"Millivolt",convertValue:.001},kV:{name:"Kilovolt",convertValue:1e3}}}),A=a({baseUnit:"m³",units:{"m³":{name:"Cubic Meter",convertValue:1},liter:{name:"Liter",convertValue:.001},"cm³":{name:"Cubic Centimeter",convertValue:1e-6},"mm³":{name:"Cubic Millimeter",convertValue:1e-9},gallon:{name:"Gallon",convertValue:.00378541},quart:{name:"Quart",convertValue:946353e-9}}}),N={baseUnit:"m3/h",units:{"m3/h":{name:"Cubic meter per hour",convertValue:1},"m3/day":{name:"Cubic meter per day",convertValue:1/24},"ft3/h":{name:"Cubic foot per hour",convertValue:.0283168},"ft3/day":{name:"Cubic foot per day",convertValue:.0283168/24},"gal/h":{name:"Gallon per hour",convertValue:.00378541},"gal/day":{name:"Gallon per day",convertValue:.00378541/24},"m3/s":{name:"Cubic meter per second",convertValue:1/3600},"ft3/s":{name:"Cubic foot per second",convertValue:.0283168/3600},"gal/s":{name:"Gallon per second",convertValue:.00378541/3600}}},G=a(N);e.acceleration=m,e.area=s,e.density=V,e.electricCharge=d,e.electricCurrent=h,e.energy=b,e.force=g,e.length=f,e.mass=y,e.massFlow=M,e.power=S,e.pressure=P,e.pressureManometric=U,e.speed=w,e.standardVolumetricFlow=$,e.surfaceTension=K,e.time=F,e.viscosity=D,e.voltage=T,e.volume=A,e.volumetricFlow=G,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Measurement, type MeasurementUnits } from './types';
|
|
2
|
+
declare class InternalConverter<T extends Measurement> {
|
|
3
|
+
readonly _definitions: T;
|
|
4
|
+
readonly _val: number;
|
|
5
|
+
private _fromUnit;
|
|
6
|
+
constructor(numerator: number, _definitions: T);
|
|
7
|
+
from<U extends MeasurementUnits<T>>(fromUnit: U): InternalConverter<T>;
|
|
8
|
+
to<U extends MeasurementUnits<T>>(toUnit: U): number;
|
|
9
|
+
private _getUnit;
|
|
10
|
+
private _checkUnit;
|
|
11
|
+
}
|
|
12
|
+
export default InternalConverter;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import InternalConverter from './internalConverter';
|
|
2
|
+
import { type Measurement, type MeasurementUnits } from './types';
|
|
3
|
+
declare class PublicConverter<T extends Measurement> {
|
|
4
|
+
readonly _internalConverter: InternalConverter<T>;
|
|
5
|
+
constructor(numerator: number, definitions: T);
|
|
6
|
+
from<U extends MeasurementUnits<T>>(fromUnit: U): IntermediateConverter<T>;
|
|
7
|
+
}
|
|
8
|
+
declare class IntermediateConverter<T extends Measurement> {
|
|
9
|
+
readonly _internalConverter: InternalConverter<T>;
|
|
10
|
+
constructor(_internalConverter: InternalConverter<T>);
|
|
11
|
+
to<U extends MeasurementUnits<T>>(toUnit: U): number;
|
|
12
|
+
}
|
|
13
|
+
declare const createConverter: <T extends Measurement>(definitions: T) => (val: number) => PublicConverter<T>;
|
|
14
|
+
export default createConverter;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Acceleration } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").AccelerationUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").AccelerationUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Acceleration>;
|
|
4
|
+
from<U extends keyof import("../types").AccelerationUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Acceleration>;
|
|
6
|
+
to<U_1 extends keyof import("../types").AccelerationUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/area.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Area } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").AreaUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").AreaUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Area>;
|
|
4
|
+
from<U extends keyof import("../types").AreaUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Area>;
|
|
6
|
+
to<U_1 extends keyof import("../types").AreaUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/density.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Density } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").DensityUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").DensityUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Density>;
|
|
4
|
+
from<U extends keyof import("../types").DensityUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Density>;
|
|
6
|
+
to<U_1 extends keyof import("../types").DensityUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type ElectricCharge } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").ElectricChargeUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").ElectricChargeUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<ElectricCharge>;
|
|
4
|
+
from<U extends keyof import("../types").ElectricChargeUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<ElectricCharge>;
|
|
6
|
+
to<U_1 extends keyof import("../types").ElectricChargeUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type ElectricCurrent } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").ElectricCurrentUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").ElectricCurrentUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<ElectricCurrent>;
|
|
4
|
+
from<U extends keyof import("../types").ElectricCurrentUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<ElectricCurrent>;
|
|
6
|
+
to<U_1 extends keyof import("../types").ElectricCurrentUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/energy.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Energy } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").EnergyUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").EnergyUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Energy>;
|
|
4
|
+
from<U extends keyof import("../types").EnergyUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Energy>;
|
|
6
|
+
to<U_1 extends keyof import("../types").EnergyUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/force.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Force } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").ForceUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").ForceUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Force>;
|
|
4
|
+
from<U extends keyof import("../types").ForceUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Force>;
|
|
6
|
+
to<U_1 extends keyof import("../types").ForceUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/length.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Length } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").LengthUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").LengthUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Length>;
|
|
4
|
+
from<U extends keyof import("../types").LengthUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Length>;
|
|
6
|
+
to<U_1 extends keyof import("../types").LengthUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type MassFlow } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").MassFlowUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").MassFlowUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<MassFlow>;
|
|
4
|
+
from<U extends keyof import("../types").MassFlowUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<MassFlow>;
|
|
6
|
+
to<U_1 extends keyof import("../types").MassFlowUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/mass.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Mass } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").MassUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").MassUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Mass>;
|
|
4
|
+
from<U extends keyof import("../types").MassUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Mass>;
|
|
6
|
+
to<U_1 extends keyof import("../types").MassUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/power.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Power } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").PowerUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").PowerUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Power>;
|
|
4
|
+
from<U extends keyof import("../types").PowerUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Power>;
|
|
6
|
+
to<U_1 extends keyof import("../types").PowerUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type PressureManometric } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").PressureManometricUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").PressureManometricUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<PressureManometric>;
|
|
4
|
+
from<U extends keyof import("../types").PressureManometricUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<PressureManometric>;
|
|
6
|
+
to<U_1 extends keyof import("../types").PressureManometricUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/pressure.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Pressure } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").PressureUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").PressureUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Pressure>;
|
|
4
|
+
from<U extends keyof import("../types").PressureUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Pressure>;
|
|
6
|
+
to<U_1 extends keyof import("../types").PressureUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/speed.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Speed } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").SpeedUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").SpeedUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Speed>;
|
|
4
|
+
from<U extends keyof import("../types").SpeedUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Speed>;
|
|
6
|
+
to<U_1 extends keyof import("../types").SpeedUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type StandardVolumetricFlow } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").StandardVolumetricFlowUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").StandardVolumetricFlowUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<StandardVolumetricFlow>;
|
|
4
|
+
from<U extends keyof import("../types").StandardVolumetricFlowUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<StandardVolumetricFlow>;
|
|
6
|
+
to<U_1 extends keyof import("../types").StandardVolumetricFlowUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type SurfaceTension } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").SurfaceTensionUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").SurfaceTensionUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<SurfaceTension>;
|
|
4
|
+
from<U extends keyof import("../types").SurfaceTensionUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<SurfaceTension>;
|
|
6
|
+
to<U_1 extends keyof import("../types").SurfaceTensionUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/time.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Time } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").TimeUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").TimeUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Time>;
|
|
4
|
+
from<U extends keyof import("../types").TimeUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Time>;
|
|
6
|
+
to<U_1 extends keyof import("../types").TimeUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Viscosity } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").ViscosityUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").ViscosityUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Viscosity>;
|
|
4
|
+
from<U extends keyof import("../types").ViscosityUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Viscosity>;
|
|
6
|
+
to<U_1 extends keyof import("../types").ViscosityUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/voltage.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Voltage } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").VoltageUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").VoltageUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Voltage>;
|
|
4
|
+
from<U extends keyof import("../types").VoltageUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Voltage>;
|
|
6
|
+
to<U_1 extends keyof import("../types").VoltageUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/dist/units/volume.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type Volume } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").VolumeUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").VolumeUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<Volume>;
|
|
4
|
+
from<U extends keyof import("../types").VolumeUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<Volume>;
|
|
6
|
+
to<U_1 extends keyof import("../types").VolumeUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type VolumetricFlow } from '../types';
|
|
2
2
|
declare const _default: (val: number) => {
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_getUnit(unit: keyof import("../types").VolumetricFlowUnits): number;
|
|
9
|
-
_checkUnit(unit: keyof import("../types").VolumetricFlowUnits): void;
|
|
3
|
+
readonly _internalConverter: import("../internalConverter").default<VolumetricFlow>;
|
|
4
|
+
from<U extends keyof import("../types").VolumetricFlowUnits>(fromUnit: U): {
|
|
5
|
+
readonly _internalConverter: import("../internalConverter").default<VolumetricFlow>;
|
|
6
|
+
to<U_1 extends keyof import("../types").VolumetricFlowUnits>(toUnit: U_1): number;
|
|
7
|
+
};
|
|
10
8
|
};
|
|
11
9
|
export default _default;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/alanhaertel/engineering-unit-converter.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.0.
|
|
7
|
+
"version": "0.0.4",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"units",
|
|
10
10
|
"engineering",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"metric",
|
|
14
14
|
"unit converter"
|
|
15
15
|
],
|
|
16
|
+
"license": "mit",
|
|
16
17
|
"type": "module",
|
|
17
18
|
"files": [
|
|
18
19
|
"dist"
|