engineering-unit-converter 0.0.4 → 0.0.6
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 +3 -4
- package/dist/engineering-unit-converter.js +26 -49
- package/dist/engineering-unit-converter.umd.cjs +1 -1
- package/dist/types.d.ts +4 -4
- package/package.json +49 -49
- package/dist/converter.d.ts +0 -0
package/README.md
CHANGED
|
@@ -14,15 +14,14 @@ npm install engineering-unit-converter
|
|
|
14
14
|
Usage
|
|
15
15
|
-----
|
|
16
16
|
|
|
17
|
-
`engineering-unit-converter` uses TypeScript to infer the
|
|
18
|
-
|
|
19
|
-
Using this library is simple, the above snippet shows a example:
|
|
17
|
+
`engineering-unit-converter` uses TypeScript to infer the available units, I strongly recommend using it for making the dev experience better.
|
|
20
18
|
|
|
19
|
+
Using this library is simple, the above snippet shows an example:
|
|
21
20
|
|
|
22
21
|
```js
|
|
23
22
|
import { massFlow } from 'engineering-unit-converter'
|
|
24
23
|
const newValue = massFlow(65000).from('lb/day').to('kg/h')
|
|
25
|
-
console.log(newValue) //
|
|
24
|
+
console.log(newValue) //1228.4818798922718
|
|
26
25
|
```
|
|
27
26
|
|
|
28
27
|
Available units
|
|
@@ -129,23 +129,19 @@ const n = (t) => (e) => new m(e, t), i = {
|
|
|
129
129
|
},
|
|
130
130
|
"lb/ft3": {
|
|
131
131
|
name: "Pound per cubic foot",
|
|
132
|
-
convertValue: 0.
|
|
133
|
-
// Conversion factor from kg/m3 to lb/ft3
|
|
132
|
+
convertValue: 1 / 0.062427962
|
|
134
133
|
},
|
|
135
134
|
"g/cm3": {
|
|
136
135
|
name: "Gram per cubic centimeter",
|
|
137
136
|
convertValue: 1e-3
|
|
138
|
-
// Conversion factor from kg/m3 to g/cm3
|
|
139
137
|
},
|
|
140
138
|
"kg/ft3": {
|
|
141
139
|
name: "Kilogram per cubic foot",
|
|
142
|
-
convertValue: 1 /
|
|
143
|
-
// Conversion factor from lb/ft3 to kg/ft3
|
|
140
|
+
convertValue: 1 / 0.0283168
|
|
144
141
|
},
|
|
145
142
|
"lb/m3": {
|
|
146
143
|
name: "Pound per cubic meter",
|
|
147
|
-
convertValue:
|
|
148
|
-
// Conversion factor from lb/ft³ to lb/m³
|
|
144
|
+
convertValue: 1 / 2.20462
|
|
149
145
|
}
|
|
150
146
|
}
|
|
151
147
|
}, N = n(V), p = {
|
|
@@ -303,12 +299,10 @@ const n = (t) => (e) => new m(e, t), i = {
|
|
|
303
299
|
"kg/h": {
|
|
304
300
|
name: "Kilogram per hour",
|
|
305
301
|
convertValue: 1 / 3600
|
|
306
|
-
// 1 hour = 3600 seconds
|
|
307
302
|
},
|
|
308
303
|
"lb/day": {
|
|
309
304
|
name: "Pound per day",
|
|
310
|
-
convertValue:
|
|
311
|
-
// 1 lb = 0.000453592 kg, 1 day = 86400 seconds
|
|
305
|
+
convertValue: 1 / 190479
|
|
312
306
|
},
|
|
313
307
|
"g/s": {
|
|
314
308
|
name: "Gram per second",
|
|
@@ -316,27 +310,23 @@ const n = (t) => (e) => new m(e, t), i = {
|
|
|
316
310
|
},
|
|
317
311
|
"lb/h": {
|
|
318
312
|
name: "Pound per hour",
|
|
319
|
-
convertValue:
|
|
313
|
+
convertValue: 1 / (190479 / 24)
|
|
320
314
|
},
|
|
321
315
|
"ton/day": {
|
|
322
316
|
name: "Ton per day",
|
|
323
|
-
convertValue:
|
|
324
|
-
// 1 ton = 1000 kg
|
|
317
|
+
convertValue: 1 / (34762.5 / 365)
|
|
325
318
|
},
|
|
326
319
|
"oz/min": {
|
|
327
320
|
name: "Ounce per minute",
|
|
328
|
-
convertValue:
|
|
329
|
-
// 1 oz = 0.0283495 kg, 1 minute = 60 seconds
|
|
321
|
+
convertValue: 1 / 2116.4394433764
|
|
330
322
|
},
|
|
331
323
|
"ton/year": {
|
|
332
324
|
name: "Ton per year",
|
|
333
|
-
|
|
334
|
-
convertValue: 1e3 / 86400 / 365
|
|
335
|
-
// Assuming 1 ton/year = 1000 kg / 86400 seconds / 365 days
|
|
325
|
+
convertValue: 1 / 34762.5
|
|
336
326
|
},
|
|
337
327
|
"lb/s": {
|
|
338
328
|
name: "Pound per second",
|
|
339
|
-
convertValue:
|
|
329
|
+
convertValue: 1 / (190479 / 86400)
|
|
340
330
|
},
|
|
341
331
|
"kg/day": {
|
|
342
332
|
name: "Kilogram per day",
|
|
@@ -523,7 +513,7 @@ const n = (t) => (e) => new m(e, t), i = {
|
|
|
523
513
|
},
|
|
524
514
|
SCFD: {
|
|
525
515
|
name: "Standard Cubic Feet per Day",
|
|
526
|
-
convertValue:
|
|
516
|
+
convertValue: 1 / 35.3147
|
|
527
517
|
// Conversion factor from SCMD to SCFD
|
|
528
518
|
},
|
|
529
519
|
MSCMD: {
|
|
@@ -538,12 +528,12 @@ const n = (t) => (e) => new m(e, t), i = {
|
|
|
538
528
|
},
|
|
539
529
|
MSCFD: {
|
|
540
530
|
name: "Million Standard Cubic Feet per Day",
|
|
541
|
-
convertValue:
|
|
531
|
+
convertValue: 1 / 35.3147 * 1e3
|
|
542
532
|
// Conversion factor from SCMD to MSCFD
|
|
543
533
|
},
|
|
544
534
|
MMSCFD: {
|
|
545
535
|
name: "Million Million Standard Cubic Feet per Day",
|
|
546
|
-
convertValue:
|
|
536
|
+
convertValue: 1 / 35.3147 * 1e6
|
|
547
537
|
// Conversion factor from SCMD to MMSCFD
|
|
548
538
|
}
|
|
549
539
|
}
|
|
@@ -602,28 +592,23 @@ const n = (t) => (e) => new m(e, t), i = {
|
|
|
602
592
|
},
|
|
603
593
|
"Pa·s": {
|
|
604
594
|
name: "Pascal second",
|
|
605
|
-
convertValue: 1e-3
|
|
606
|
-
// Conversion factor from cP to Pa·s
|
|
595
|
+
convertValue: 1 / 1e-3
|
|
607
596
|
},
|
|
608
|
-
"lb·
|
|
609
|
-
name: "Pound
|
|
610
|
-
convertValue:
|
|
611
|
-
// Conversion factor from cP to lb·ft/s·h
|
|
597
|
+
"lb/ft·s": {
|
|
598
|
+
name: "Pound per second-foot",
|
|
599
|
+
convertValue: 1 / 671968994813e-15
|
|
612
600
|
},
|
|
613
|
-
"kg/m·s
|
|
601
|
+
"kg/m·s": {
|
|
614
602
|
name: "Kilogram per meter-second-hour",
|
|
615
|
-
convertValue: 1e-3
|
|
616
|
-
// Conversion factor from cP to kg/m·s·h
|
|
603
|
+
convertValue: 1 / 1e-3
|
|
617
604
|
},
|
|
618
|
-
"lb
|
|
619
|
-
name: "Pound
|
|
620
|
-
convertValue:
|
|
621
|
-
// Conversion factor from cP to lb·ft/s·ft
|
|
605
|
+
"lb/ft·h": {
|
|
606
|
+
name: "Pound per hour-foot",
|
|
607
|
+
convertValue: 1 / 2.4190883105
|
|
622
608
|
},
|
|
623
|
-
"kg/m·
|
|
609
|
+
"kg/m·h": {
|
|
624
610
|
name: "Kilogram per meter-second-meter",
|
|
625
|
-
convertValue:
|
|
626
|
-
// Conversion factor from cP to kg/m·s·m
|
|
611
|
+
convertValue: 1 / 3.6
|
|
627
612
|
}
|
|
628
613
|
}
|
|
629
614
|
}, R = n(_), $ = {
|
|
@@ -686,42 +671,34 @@ const n = (t) => (e) => new m(e, t), i = {
|
|
|
686
671
|
"m3/day": {
|
|
687
672
|
name: "Cubic meter per day",
|
|
688
673
|
convertValue: 1 / 24
|
|
689
|
-
// Assuming 1 day = 24 hours
|
|
690
674
|
},
|
|
691
675
|
"ft3/h": {
|
|
692
676
|
name: "Cubic foot per hour",
|
|
693
677
|
convertValue: 0.0283168
|
|
694
|
-
// Conversion factor from cubic meter to cubic foot
|
|
695
678
|
},
|
|
696
679
|
"ft3/day": {
|
|
697
680
|
name: "Cubic foot per day",
|
|
698
681
|
convertValue: 0.0283168 / 24
|
|
699
|
-
// Conversion factor from cubic meter to cubic foot, assuming 1 day = 24 hours
|
|
700
682
|
},
|
|
701
683
|
"gal/h": {
|
|
702
684
|
name: "Gallon per hour",
|
|
703
685
|
convertValue: 378541e-8
|
|
704
|
-
// Conversion factor from cubic meter to gallon
|
|
705
686
|
},
|
|
706
687
|
"gal/day": {
|
|
707
688
|
name: "Gallon per day",
|
|
708
689
|
convertValue: 378541e-8 / 24
|
|
709
|
-
// Conversion factor from cubic meter to gallon, assuming 1 day = 24 hours
|
|
710
690
|
},
|
|
711
691
|
"m3/s": {
|
|
712
692
|
name: "Cubic meter per second",
|
|
713
|
-
convertValue:
|
|
714
|
-
// Assuming 1 hour = 3600 seconds
|
|
693
|
+
convertValue: 3600
|
|
715
694
|
},
|
|
716
695
|
"ft3/s": {
|
|
717
696
|
name: "Cubic foot per second",
|
|
718
|
-
convertValue:
|
|
719
|
-
// Conversion factor from cubic meter to cubic foot, assuming 1 hour = 3600 seconds
|
|
697
|
+
convertValue: 1 / 980963e-8
|
|
720
698
|
},
|
|
721
699
|
"gal/s": {
|
|
722
700
|
name: "Gallon per second",
|
|
723
|
-
convertValue: 378541e-8
|
|
724
|
-
// Conversion factor from cubic meter to gallon, assuming 1 hour = 3600 seconds
|
|
701
|
+
convertValue: 378541e-8 * 3600
|
|
725
702
|
}
|
|
726
703
|
}
|
|
727
704
|
}, ee = n(F);
|
|
@@ -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 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
|
|
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:1/.062427962},"g/cm3":{name:"Gram per cubic centimeter",convertValue:.001},"kg/ft3":{name:"Kilogram per cubic foot",convertValue:1/.0283168},"lb/m3":{name:"Pound per cubic meter",convertValue:1/2.20462}}},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:1/190479},"g/s":{name:"Gram per second",convertValue:.001},"lb/h":{name:"Pound per hour",convertValue:1/(190479/24)},"ton/day":{name:"Ton per day",convertValue:1/(34762.5/365)},"oz/min":{name:"Ounce per minute",convertValue:1/2116.4394433764},"ton/year":{name:"Ton per year",convertValue:1/34762.5},"lb/s":{name:"Pound per second",convertValue:1/(190479/86400)},"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:1/35.3147},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:1/35.3147*1e3},MMSCFD:{name:"Million Million Standard Cubic Feet per Day",convertValue:1/35.3147*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:1/.001},"lb/ft·s":{name:"Pound per second-foot",convertValue:1/.000671968994813},"kg/m·s":{name:"Kilogram per meter-second-hour",convertValue:1/.001},"lb/ft·h":{name:"Pound per hour-foot",convertValue:1/2.4190883105},"kg/m·h":{name:"Kilogram per meter-second-meter",convertValue:1/3.6}}},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:3600},"ft3/s":{name:"Cubic foot per second",convertValue:1/.00980963},"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"})});
|
package/dist/types.d.ts
CHANGED
|
@@ -56,10 +56,10 @@ export type Density = {
|
|
|
56
56
|
export type ViscosityUnits = {
|
|
57
57
|
cP: UnitsValues;
|
|
58
58
|
'Pa·s': UnitsValues;
|
|
59
|
-
'lb·
|
|
60
|
-
'kg/m·
|
|
61
|
-
'lb
|
|
62
|
-
'kg/m·s
|
|
59
|
+
'lb/ft·s': UnitsValues;
|
|
60
|
+
'kg/m·h': UnitsValues;
|
|
61
|
+
'lb/ft·h': UnitsValues;
|
|
62
|
+
'kg/m·s': UnitsValues;
|
|
63
63
|
};
|
|
64
64
|
export type Viscosity = {
|
|
65
65
|
baseUnit: 'cP';
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "engineering-unit-converter",
|
|
3
|
-
"repository": {
|
|
4
|
-
"type": "git",
|
|
5
|
-
"url": "git+https://github.com/alanhaertel/engineering-unit-converter.git"
|
|
6
|
-
},
|
|
7
|
-
"version": "0.0.
|
|
8
|
-
"keywords": [
|
|
9
|
-
"units",
|
|
10
|
-
"engineering",
|
|
11
|
-
"unit manipulation",
|
|
12
|
-
"convert",
|
|
13
|
-
"metric",
|
|
14
|
-
"unit converter"
|
|
15
|
-
],
|
|
16
|
-
"license": "
|
|
17
|
-
"type": "module",
|
|
18
|
-
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
],
|
|
21
|
-
"main": "./dist/engineering-unit-converter.umd.cjs",
|
|
22
|
-
"module": "./dist/engineering-unit-converter.js",
|
|
23
|
-
"exports": {
|
|
24
|
-
".": {
|
|
25
|
-
"import": "./dist/engineering-unit-converter.js",
|
|
26
|
-
"require": "./dist/engineering-unit-converter.umd.cjs",
|
|
27
|
-
"types": "./dist/index.d.ts"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"dev": "vite",
|
|
32
|
-
"build": "tsc && vite build",
|
|
33
|
-
"preview": "vite preview"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
37
|
-
"eslint": "^8.55.0",
|
|
38
|
-
"eslint-config-standard-with-typescript": "^40.0.0",
|
|
39
|
-
"eslint-plugin-import": "^2.29.0",
|
|
40
|
-
"eslint-plugin-n": "^16.3.1",
|
|
41
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
42
|
-
"typescript": "^5.3.2",
|
|
43
|
-
"vite": "^5.0.0",
|
|
44
|
-
"@changesets/cli": "^2.27.1",
|
|
45
|
-
"vite-plugin-dts": "^3.6.4"
|
|
46
|
-
},
|
|
47
|
-
"publishConfig": {
|
|
48
|
-
"access": "public"
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "engineering-unit-converter",
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "git+https://github.com/alanhaertel/engineering-unit-converter.git"
|
|
6
|
+
},
|
|
7
|
+
"version": "0.0.6",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"units",
|
|
10
|
+
"engineering",
|
|
11
|
+
"unit manipulation",
|
|
12
|
+
"convert",
|
|
13
|
+
"metric",
|
|
14
|
+
"unit converter"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"main": "./dist/engineering-unit-converter.umd.cjs",
|
|
22
|
+
"module": "./dist/engineering-unit-converter.js",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"import": "./dist/engineering-unit-converter.js",
|
|
26
|
+
"require": "./dist/engineering-unit-converter.umd.cjs",
|
|
27
|
+
"types": "./dist/index.d.ts"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"dev": "vite",
|
|
32
|
+
"build": "tsc && vite build",
|
|
33
|
+
"preview": "vite preview"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
37
|
+
"eslint": "^8.55.0",
|
|
38
|
+
"eslint-config-standard-with-typescript": "^40.0.0",
|
|
39
|
+
"eslint-plugin-import": "^2.29.0",
|
|
40
|
+
"eslint-plugin-n": "^16.3.1",
|
|
41
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
42
|
+
"typescript": "^5.3.2",
|
|
43
|
+
"vite": "^5.0.0",
|
|
44
|
+
"@changesets/cli": "^2.27.1",
|
|
45
|
+
"vite-plugin-dts": "^3.6.4"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
}
|
|
50
50
|
}
|
package/dist/converter.d.ts
DELETED
|
File without changes
|