@oliasoft-open-source/units 4.5.2 → 4.5.3-beta-1
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.js +1 -1
- package/dist/numbers/numbers.cjs +1 -1
- package/dist/numbers/numbers.js +1 -1
- package/dist/{units-DrwQLYMh.cjs → units-B3mFL4mq.cjs} +12 -3
- package/dist/{units-DKcliZbm.js → units-COuQAjLd.js} +12 -3
- 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.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-COuQAjLd.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-COuQAjLd.js';
|
|
2
2
|
import 'fraction.js';
|
|
@@ -1218,8 +1218,17 @@ const C = Object.freeze({
|
|
|
1218
1218
|
day_to_second: 60 * 60 * 24,
|
|
1219
1219
|
m3_per_m_to_ft3_per_ft: 10.763910416709722,
|
|
1220
1220
|
// https://www.wolframalpha.com/input?i=cubic+meter+per+meter++to+feet+cubic+per+foot&assumption=%7B%22F%22%2C+%22UnitsConversion2%22%2C+%22fromValue%22%7D+-%3E%220.100000000000000000%22
|
|
1221
|
-
in3_per_ft_to_m3_per_m: 537633333333e-16
|
|
1221
|
+
in3_per_ft_to_m3_per_m: 537633333333e-16,
|
|
1222
1222
|
// 1 / m3_per_m_to_ft3_per_ft / ft3_to_in3 = 0.000053763333333333334 https://www.wolframalpha.com/input?i=cubic+meter+per+meter++to+feet+cubic+per+foot&assumption=%7B%22F%22%2C+%22UnitsConversion2%22%2C+%22fromValue%22%7D+-%3E%220.100000000000000000%22
|
|
1223
|
+
/* OW-24122 Flow rate conversion MSm³/d
|
|
1224
|
+
`Mega Standard Cubic Metre per day` (`MSm3/d`) <-> `meters cubed per second` (`m3/s`)
|
|
1225
|
+
1 `MSm3/d`
|
|
1226
|
+
= `1 * 625/54` `m3/s` (https://www.wolframalpha.com/input?i=Mega+Standard+Cubic+Metre+per+day)
|
|
1227
|
+
= `1 / (86400 * 1e-6)` `m3/s` (OW-24122)
|
|
1228
|
+
= `11.5740740741`
|
|
1229
|
+
We can represent this as `625 / 54` or `1_000_000 / 86400`
|
|
1230
|
+
*/
|
|
1231
|
+
MSm3d_to_m3s: 625 / 54
|
|
1223
1232
|
});
|
|
1224
1233
|
const KNOWN_CONVERSIONS = Object.freeze({
|
|
1225
1234
|
// LENGTH
|
|
@@ -1426,7 +1435,7 @@ const KNOWN_CONVERSIONS = Object.freeze({
|
|
|
1426
1435
|
"m3/s|MMSCFD": (val) => val / 0.32774128,
|
|
1427
1436
|
"m3/s|STB/d": (val) => val * 1346875e8 / 247854343,
|
|
1428
1437
|
"m3/s|Sm3/d": (val) => val * C.day_to_second,
|
|
1429
|
-
"m3/s|MSm3/d": (val) => val /
|
|
1438
|
+
"m3/s|MSm3/d": (val) => val / C.MSm3d_to_m3s,
|
|
1430
1439
|
"m3/s|SCF/d": (val) => val * 3.0511872047366146e6,
|
|
1431
1440
|
"ft3/s|m3/s": (val) => val * C.ft3_to_m3,
|
|
1432
1441
|
"lpm|m3/s": (val) => val / 6e4,
|
|
@@ -1457,7 +1466,7 @@ const KNOWN_CONVERSIONS = Object.freeze({
|
|
|
1457
1466
|
"Sm3/d|m3/s": (val) => val / C.day_to_second,
|
|
1458
1467
|
"MSm3/d|Sm3/d": (val) => val * 1e6,
|
|
1459
1468
|
"Sm3/d|MSm3/d": (val) => val * 1e-6,
|
|
1460
|
-
"MSm3/d|m3/s": (val) => val *
|
|
1469
|
+
"MSm3/d|m3/s": (val) => val * C.MSm3d_to_m3s,
|
|
1461
1470
|
"SCF/d|m3/s": (val) => val * 32774128e-14,
|
|
1462
1471
|
// TURBULENT SKIN
|
|
1463
1472
|
"1/m3/d|1/MMSCFD": (val) => val * 28316.85,
|
|
@@ -1216,8 +1216,17 @@ const C = Object.freeze({
|
|
|
1216
1216
|
day_to_second: 60 * 60 * 24,
|
|
1217
1217
|
m3_per_m_to_ft3_per_ft: 10.763910416709722,
|
|
1218
1218
|
// https://www.wolframalpha.com/input?i=cubic+meter+per+meter++to+feet+cubic+per+foot&assumption=%7B%22F%22%2C+%22UnitsConversion2%22%2C+%22fromValue%22%7D+-%3E%220.100000000000000000%22
|
|
1219
|
-
in3_per_ft_to_m3_per_m: 537633333333e-16
|
|
1219
|
+
in3_per_ft_to_m3_per_m: 537633333333e-16,
|
|
1220
1220
|
// 1 / m3_per_m_to_ft3_per_ft / ft3_to_in3 = 0.000053763333333333334 https://www.wolframalpha.com/input?i=cubic+meter+per+meter++to+feet+cubic+per+foot&assumption=%7B%22F%22%2C+%22UnitsConversion2%22%2C+%22fromValue%22%7D+-%3E%220.100000000000000000%22
|
|
1221
|
+
/* OW-24122 Flow rate conversion MSm³/d
|
|
1222
|
+
`Mega Standard Cubic Metre per day` (`MSm3/d`) <-> `meters cubed per second` (`m3/s`)
|
|
1223
|
+
1 `MSm3/d`
|
|
1224
|
+
= `1 * 625/54` `m3/s` (https://www.wolframalpha.com/input?i=Mega+Standard+Cubic+Metre+per+day)
|
|
1225
|
+
= `1 / (86400 * 1e-6)` `m3/s` (OW-24122)
|
|
1226
|
+
= `11.5740740741`
|
|
1227
|
+
We can represent this as `625 / 54` or `1_000_000 / 86400`
|
|
1228
|
+
*/
|
|
1229
|
+
MSm3d_to_m3s: 625 / 54
|
|
1221
1230
|
});
|
|
1222
1231
|
const KNOWN_CONVERSIONS = Object.freeze({
|
|
1223
1232
|
// LENGTH
|
|
@@ -1424,7 +1433,7 @@ const KNOWN_CONVERSIONS = Object.freeze({
|
|
|
1424
1433
|
"m3/s|MMSCFD": (val) => val / 0.32774128,
|
|
1425
1434
|
"m3/s|STB/d": (val) => val * 1346875e8 / 247854343,
|
|
1426
1435
|
"m3/s|Sm3/d": (val) => val * C.day_to_second,
|
|
1427
|
-
"m3/s|MSm3/d": (val) => val /
|
|
1436
|
+
"m3/s|MSm3/d": (val) => val / C.MSm3d_to_m3s,
|
|
1428
1437
|
"m3/s|SCF/d": (val) => val * 3.0511872047366146e6,
|
|
1429
1438
|
"ft3/s|m3/s": (val) => val * C.ft3_to_m3,
|
|
1430
1439
|
"lpm|m3/s": (val) => val / 6e4,
|
|
@@ -1455,7 +1464,7 @@ const KNOWN_CONVERSIONS = Object.freeze({
|
|
|
1455
1464
|
"Sm3/d|m3/s": (val) => val / C.day_to_second,
|
|
1456
1465
|
"MSm3/d|Sm3/d": (val) => val * 1e6,
|
|
1457
1466
|
"Sm3/d|MSm3/d": (val) => val * 1e-6,
|
|
1458
|
-
"MSm3/d|m3/s": (val) => val *
|
|
1467
|
+
"MSm3/d|m3/s": (val) => val * C.MSm3d_to_m3s,
|
|
1459
1468
|
"SCF/d|m3/s": (val) => val * 32774128e-14,
|
|
1460
1469
|
// TURBULENT SKIN
|
|
1461
1470
|
"1/m3/d|1/MMSCFD": (val) => val * 28316.85,
|
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-COuQAjLd.js';
|
|
2
2
|
import 'fraction.js';
|