@oliasoft-open-source/units 4.4.4 → 4.5.0
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.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/numbers/numbers.cjs +1 -1
- package/dist/numbers/numbers.js +1 -1
- package/dist/{units-B3a2-Mk6.cjs → units-CJ3ckQN8.cjs} +15 -1
- package/dist/{units-CNKurcic.js → units-CrmXBjNL.js} +15 -1
- package/dist/units.cjs +1 -1
- package/dist/units.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a3 as ALT_UNITS, a7 as DEPRECATED_UNITS, a9 as INTERMEDIATE_CONVERSIONS, a6 as KNOWN_CONVERSIONS, aa as KNOWN_UNITS, a4 as LABELS, ab as QUANTITIES_DESCRIPTION, ac as UNITS_DESCRIPTION, a8 as UNIT_ALIASES, a5 as UNIT_FROM_KEY, O as allNumbers, i as altUnitsList, W as asFraction, S as charCount, c as checkAndCleanDecimalComma, Z as cleanNum, Y as cleanNumStr, q as convertAndGetValue, x as convertAndGetValueStrict, p as convertSamePrecision, j as convertTable, Q as displayNumber, R as displayNumberToFixed, P as formatNumber, U as fraction, g as getAltUnitsListByQuantity, T as getNumberOfDigitsToShow, b as getQuantities, o as getUnit, a as getUnitsForQuantity, n as getValue, H as isCloseTo, K as isCloseToOrGreaterThan, J as isCloseToOrLessThan, I as isDeepCloseTo, N as isEmptyValueWithUnit, V as isFraction, M as isNonNumerical, L as isNumeric, a1 as isScientificStringNum, a0 as isValidNum, m as isValueWithUnit, l as label, X as numFraction, A as round, E as roundByMagnitude, F as roundByMagnitudeToFixed, G as roundByRange, r as roundNumberWithLabel, D as roundToDecimalPrecision, B as roundToFixed, C as roundToPrecision, s as showAltUnitsList, e as split, a2 as stripLeadingZeros, t as to, h as toBase, _ as toNum, $ as toString, u as unitFromKey, d as unitFromQuantity, f as unum, k as unumWithUnit, v as validateAndClean, z as validateNumber, y as withPrettyUnitLabel, w as withUnit } from './units-
|
|
1
|
+
export { a3 as ALT_UNITS, a7 as DEPRECATED_UNITS, a9 as INTERMEDIATE_CONVERSIONS, a6 as KNOWN_CONVERSIONS, aa as KNOWN_UNITS, a4 as LABELS, ab as QUANTITIES_DESCRIPTION, ac as UNITS_DESCRIPTION, a8 as UNIT_ALIASES, a5 as UNIT_FROM_KEY, O as allNumbers, i as altUnitsList, W as asFraction, S as charCount, c as checkAndCleanDecimalComma, Z as cleanNum, Y as cleanNumStr, q as convertAndGetValue, x as convertAndGetValueStrict, p as convertSamePrecision, j as convertTable, Q as displayNumber, R as displayNumberToFixed, P as formatNumber, U as fraction, g as getAltUnitsListByQuantity, T as getNumberOfDigitsToShow, b as getQuantities, o as getUnit, a as getUnitsForQuantity, n as getValue, H as isCloseTo, K as isCloseToOrGreaterThan, J as isCloseToOrLessThan, I as isDeepCloseTo, N as isEmptyValueWithUnit, V as isFraction, M as isNonNumerical, L as isNumeric, a1 as isScientificStringNum, a0 as isValidNum, m as isValueWithUnit, l as label, X as numFraction, A as round, E as roundByMagnitude, F as roundByMagnitudeToFixed, G as roundByRange, r as roundNumberWithLabel, D as roundToDecimalPrecision, B as roundToFixed, C as roundToPrecision, s as showAltUnitsList, e as split, a2 as stripLeadingZeros, t as to, h as toBase, _ as toNum, $ as toString, u as unitFromKey, d as unitFromQuantity, f as unum, k as unumWithUnit, v as validateAndClean, z as validateNumber, y as withPrettyUnitLabel, w as withUnit } from './units-CrmXBjNL.js';
|
|
2
2
|
import 'fraction.js';
|
package/dist/numbers/numbers.cjs
CHANGED
package/dist/numbers/numbers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a1 as isScientificStringNum, a0 as isValidNum, _ as toNum, $ as toString } from '../units-
|
|
1
|
+
export { a1 as isScientificStringNum, a0 as isValidNum, _ as toNum, $ as toString } from '../units-CrmXBjNL.js';
|
|
2
2
|
import 'fraction.js';
|
|
@@ -865,6 +865,8 @@ const LABELS = Object.freeze({
|
|
|
865
865
|
gpm: "gpm",
|
|
866
866
|
"kg/s": "kg/s",
|
|
867
867
|
"lbm/s": "lbm/s",
|
|
868
|
+
"tonnes/h": "tonnes/h",
|
|
869
|
+
"tons/h": "tons/h",
|
|
868
870
|
"deg/m": "\xB0/m",
|
|
869
871
|
"deg/ft": "\xB0/ft",
|
|
870
872
|
"rad/m": "rad/m",
|
|
@@ -1016,7 +1018,7 @@ const ALT_UNITS = Object.freeze({
|
|
|
1016
1018
|
length: ["m", "cm", "ft", "km", "in", "mm"],
|
|
1017
1019
|
linearCapacity: ["l/m", "bbl/ft"],
|
|
1018
1020
|
longitude: ["\xB0E", "\xB0W"],
|
|
1019
|
-
massFlowRate: ["kg/s", "lbm/s"],
|
|
1021
|
+
massFlowRate: ["kg/s", "lbm/s", "tonnes/h", "tons/h"],
|
|
1020
1022
|
moleWeight: ["kg/mol", "lbf/mol", "g/mol"],
|
|
1021
1023
|
oilVolume: ["STB", "Sm3"],
|
|
1022
1024
|
percentage: ["%", "fr"],
|
|
@@ -1431,6 +1433,16 @@ const KNOWN_CONVERSIONS = Object.freeze({
|
|
|
1431
1433
|
// MASS FLOW RATES
|
|
1432
1434
|
"kg/s|lbm/s": (val) => val * 2.20462262,
|
|
1433
1435
|
"lbm/s|kg/s": (val) => val / 2.20462262,
|
|
1436
|
+
"kg/s|tonnes/h": (val) => val * 3.6,
|
|
1437
|
+
"tonnes/h|kg/s": (val) => val / 3.6,
|
|
1438
|
+
"kg/s|tons/h": (val) => val * 3.9683207193277967,
|
|
1439
|
+
"tons/h|kg/s": (val) => val * 0.2519957611111111,
|
|
1440
|
+
"lbm/s|tonnes/h": (val) => val * 1.632932532,
|
|
1441
|
+
"tonnes/h|lbm/s": (val) => val * 0.612395172735771,
|
|
1442
|
+
"lbm/s|tons/h": (val) => val * 1.8,
|
|
1443
|
+
"tons/h|lbm/s": (val) => val / 1.8,
|
|
1444
|
+
"tonnes/h|tons/h": (val) => val * 1.1023113109243878,
|
|
1445
|
+
"tons/h|tonnes/h": (val) => val * 0.90718474,
|
|
1434
1446
|
// PERMEABILITY
|
|
1435
1447
|
"mD|m2": (val) => val * 9869233e-19,
|
|
1436
1448
|
// https://en.wikipedia.org/wiki/Darcy_(unit)
|
|
@@ -2075,6 +2087,8 @@ const UNITS_DESCRIPTION = {
|
|
|
2075
2087
|
gpm: "Gallons per minute",
|
|
2076
2088
|
"kg/s": "Kilograms per second",
|
|
2077
2089
|
"lbm/s": "Pound mass per second",
|
|
2090
|
+
"tonnes/h": "Tonnes per hour",
|
|
2091
|
+
"tons/h": "Tons per hour",
|
|
2078
2092
|
"deg/m": "Degrees per meter",
|
|
2079
2093
|
"deg/ft": "Degrees per foot",
|
|
2080
2094
|
"rad/m": "Radians per meter",
|
|
@@ -863,6 +863,8 @@ const LABELS = Object.freeze({
|
|
|
863
863
|
gpm: "gpm",
|
|
864
864
|
"kg/s": "kg/s",
|
|
865
865
|
"lbm/s": "lbm/s",
|
|
866
|
+
"tonnes/h": "tonnes/h",
|
|
867
|
+
"tons/h": "tons/h",
|
|
866
868
|
"deg/m": "\xB0/m",
|
|
867
869
|
"deg/ft": "\xB0/ft",
|
|
868
870
|
"rad/m": "rad/m",
|
|
@@ -1014,7 +1016,7 @@ const ALT_UNITS = Object.freeze({
|
|
|
1014
1016
|
length: ["m", "cm", "ft", "km", "in", "mm"],
|
|
1015
1017
|
linearCapacity: ["l/m", "bbl/ft"],
|
|
1016
1018
|
longitude: ["\xB0E", "\xB0W"],
|
|
1017
|
-
massFlowRate: ["kg/s", "lbm/s"],
|
|
1019
|
+
massFlowRate: ["kg/s", "lbm/s", "tonnes/h", "tons/h"],
|
|
1018
1020
|
moleWeight: ["kg/mol", "lbf/mol", "g/mol"],
|
|
1019
1021
|
oilVolume: ["STB", "Sm3"],
|
|
1020
1022
|
percentage: ["%", "fr"],
|
|
@@ -1429,6 +1431,16 @@ const KNOWN_CONVERSIONS = Object.freeze({
|
|
|
1429
1431
|
// MASS FLOW RATES
|
|
1430
1432
|
"kg/s|lbm/s": (val) => val * 2.20462262,
|
|
1431
1433
|
"lbm/s|kg/s": (val) => val / 2.20462262,
|
|
1434
|
+
"kg/s|tonnes/h": (val) => val * 3.6,
|
|
1435
|
+
"tonnes/h|kg/s": (val) => val / 3.6,
|
|
1436
|
+
"kg/s|tons/h": (val) => val * 3.9683207193277967,
|
|
1437
|
+
"tons/h|kg/s": (val) => val * 0.2519957611111111,
|
|
1438
|
+
"lbm/s|tonnes/h": (val) => val * 1.632932532,
|
|
1439
|
+
"tonnes/h|lbm/s": (val) => val * 0.612395172735771,
|
|
1440
|
+
"lbm/s|tons/h": (val) => val * 1.8,
|
|
1441
|
+
"tons/h|lbm/s": (val) => val / 1.8,
|
|
1442
|
+
"tonnes/h|tons/h": (val) => val * 1.1023113109243878,
|
|
1443
|
+
"tons/h|tonnes/h": (val) => val * 0.90718474,
|
|
1432
1444
|
// PERMEABILITY
|
|
1433
1445
|
"mD|m2": (val) => val * 9869233e-19,
|
|
1434
1446
|
// https://en.wikipedia.org/wiki/Darcy_(unit)
|
|
@@ -2073,6 +2085,8 @@ const UNITS_DESCRIPTION = {
|
|
|
2073
2085
|
gpm: "Gallons per minute",
|
|
2074
2086
|
"kg/s": "Kilograms per second",
|
|
2075
2087
|
"lbm/s": "Pound mass per second",
|
|
2088
|
+
"tonnes/h": "Tonnes per hour",
|
|
2089
|
+
"tons/h": "Tons per hour",
|
|
2076
2090
|
"deg/m": "Degrees per meter",
|
|
2077
2091
|
"deg/ft": "Degrees per foot",
|
|
2078
2092
|
"rad/m": "Radians per meter",
|
package/dist/units.cjs
CHANGED
package/dist/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ae as EXP_NOTATION_RE, ad as SEPARATOR, i as altUnitsList, c as checkAndCleanDecimalComma, q as convertAndGetValue, x as convertAndGetValueStrict, p as convertSamePrecision, j as convertTable, g as getAltUnitsListByQuantity, b as getQuantities, o as getUnit, a as getUnitsForQuantity, n as getValue, m as isValueWithUnit, l as label, r as roundNumberWithLabel, s as showAltUnitsList, e as split, t as to, h as toBase, u as unitFromKey, d as unitFromQuantity, f as unum, k as unumWithUnit, v as validateAndClean, z as validateNumber, y as withPrettyUnitLabel, w as withUnit } from './units-
|
|
1
|
+
export { ae as EXP_NOTATION_RE, ad as SEPARATOR, i as altUnitsList, c as checkAndCleanDecimalComma, q as convertAndGetValue, x as convertAndGetValueStrict, p as convertSamePrecision, j as convertTable, g as getAltUnitsListByQuantity, b as getQuantities, o as getUnit, a as getUnitsForQuantity, n as getValue, m as isValueWithUnit, l as label, r as roundNumberWithLabel, s as showAltUnitsList, e as split, t as to, h as toBase, u as unitFromKey, d as unitFromQuantity, f as unum, k as unumWithUnit, v as validateAndClean, z as validateNumber, y as withPrettyUnitLabel, w as withUnit } from './units-CrmXBjNL.js';
|
|
2
2
|
import 'fraction.js';
|