@utilix-tech/sdk 0.48.0 → 0.49.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/CHANGELOG.md +3 -0
- package/README.md +6 -2
- package/dist/{chunk-KMQHBUYO.js → chunk-24OT376F.js} +22 -1
- package/dist/index.cjs +21 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/units.cjs +21 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-DU4Pisfx.d.cts → units-cVnt1_f6.d.cts} +24 -2
- package/dist/{units-DU4Pisfx.d.ts → units-cVnt1_f6.d.ts} +24 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
|
|
4
4
|
|
|
5
|
+
## 0.49.0
|
|
6
|
+
- Add `calculateCashRounding` (cash-rounding-calculator): round a cashless total to the nearest payable cash denomination ("Swedish rounding"), with round-nearest, round-up, and round-down modes.
|
|
7
|
+
|
|
5
8
|
## 0.48.0
|
|
6
9
|
- Add `resolveYamlAnchors` (yaml-anchor-resolver): expand YAML anchors, aliases, and merge keys inline, and list which anchors were referenced vs. left unused.
|
|
7
10
|
- Add `splitSitemap` (sitemap-index-splitter): split a URL list exceeding the sitemaps.org 50,000-URL cap into multiple sitemap.xml files plus a sitemap index file.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**638 developer utility functions for Node.js: runs locally, no API key required.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
6
6
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
@@ -318,7 +318,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
|
|
|
318
318
|
### `/units`: Conversions
|
|
319
319
|
|
|
320
320
|
```ts
|
|
321
|
-
import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule } from "@utilix-tech/sdk/units";
|
|
321
|
+
import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule, calculateCashRounding } from "@utilix-tech/sdk/units";
|
|
322
322
|
|
|
323
323
|
// File sizes
|
|
324
324
|
convertBytes(1073741824, "GB"); // 1
|
|
@@ -440,6 +440,10 @@ calculateCdMaturity(1000, 12, 12, 12, 3);
|
|
|
440
440
|
// Year-by-year depreciation schedule: straight-line, double-declining-balance, or sum-of-years-digits
|
|
441
441
|
calculateDepreciationSchedule(10000, 1000, 5, "straight-line");
|
|
442
442
|
// { totalDepreciation: 9000, schedule: [{ year: 1, depreciationExpense: 1800, accumulatedDepreciation: 1800, bookValue: 8200 }, ...] }
|
|
443
|
+
|
|
444
|
+
// Round a cashless total to the nearest payable cash denomination ("Swedish rounding")
|
|
445
|
+
calculateCashRounding(2.02, 0.05);
|
|
446
|
+
// { total: 2.02, roundingUnit: 0.05, mode: "nearest", roundedTotal: 2, adjustment: -0.02 }
|
|
443
447
|
```
|
|
444
448
|
|
|
445
449
|
---
|
|
@@ -22,6 +22,7 @@ __export(units_exports, {
|
|
|
22
22
|
calcSubnet: () => calcSubnet,
|
|
23
23
|
calculateBreakEven: () => calculateBreakEven,
|
|
24
24
|
calculateCashBreakdown: () => calculateCashBreakdown,
|
|
25
|
+
calculateCashRounding: () => calculateCashRounding,
|
|
25
26
|
calculateCdMaturity: () => calculateCdMaturity,
|
|
26
27
|
calculateChange: () => calculateChange,
|
|
27
28
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
@@ -2076,5 +2077,25 @@ function calculateDepreciationSchedule(cost, salvageValue, usefulLifeYears, meth
|
|
|
2076
2077
|
schedule
|
|
2077
2078
|
};
|
|
2078
2079
|
}
|
|
2080
|
+
function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
2081
|
+
if (!Number.isFinite(total)) return { error: "total must be a finite number" };
|
|
2082
|
+
if (!Number.isFinite(roundingUnit) || roundingUnit <= 0) {
|
|
2083
|
+
return { error: "roundingUnit must be a finite number greater than zero" };
|
|
2084
|
+
}
|
|
2085
|
+
if (mode !== "nearest" && mode !== "up" && mode !== "down") {
|
|
2086
|
+
return { error: 'mode must be one of: "nearest", "up", "down"' };
|
|
2087
|
+
}
|
|
2088
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2089
|
+
const steps = total / roundingUnit;
|
|
2090
|
+
const roundedSteps = mode === "up" ? Math.ceil(steps) : mode === "down" ? Math.floor(steps) : Math.round(steps);
|
|
2091
|
+
const roundedTotal = round22(roundedSteps * roundingUnit);
|
|
2092
|
+
return {
|
|
2093
|
+
total: round22(total),
|
|
2094
|
+
roundingUnit,
|
|
2095
|
+
mode,
|
|
2096
|
+
roundedTotal,
|
|
2097
|
+
adjustment: round22(roundedTotal - total)
|
|
2098
|
+
};
|
|
2099
|
+
}
|
|
2079
2100
|
|
|
2080
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
|
2101
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
package/dist/index.cjs
CHANGED
|
@@ -8188,6 +8188,7 @@ __export(units_exports, {
|
|
|
8188
8188
|
calcSubnet: () => calcSubnet,
|
|
8189
8189
|
calculateBreakEven: () => calculateBreakEven,
|
|
8190
8190
|
calculateCashBreakdown: () => calculateCashBreakdown,
|
|
8191
|
+
calculateCashRounding: () => calculateCashRounding,
|
|
8191
8192
|
calculateCdMaturity: () => calculateCdMaturity,
|
|
8192
8193
|
calculateChange: () => calculateChange,
|
|
8193
8194
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
@@ -10242,6 +10243,26 @@ function calculateDepreciationSchedule(cost, salvageValue, usefulLifeYears, meth
|
|
|
10242
10243
|
schedule
|
|
10243
10244
|
};
|
|
10244
10245
|
}
|
|
10246
|
+
function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
10247
|
+
if (!Number.isFinite(total)) return { error: "total must be a finite number" };
|
|
10248
|
+
if (!Number.isFinite(roundingUnit) || roundingUnit <= 0) {
|
|
10249
|
+
return { error: "roundingUnit must be a finite number greater than zero" };
|
|
10250
|
+
}
|
|
10251
|
+
if (mode !== "nearest" && mode !== "up" && mode !== "down") {
|
|
10252
|
+
return { error: 'mode must be one of: "nearest", "up", "down"' };
|
|
10253
|
+
}
|
|
10254
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10255
|
+
const steps = total / roundingUnit;
|
|
10256
|
+
const roundedSteps = mode === "up" ? Math.ceil(steps) : mode === "down" ? Math.floor(steps) : Math.round(steps);
|
|
10257
|
+
const roundedTotal = round23(roundedSteps * roundingUnit);
|
|
10258
|
+
return {
|
|
10259
|
+
total: round23(total),
|
|
10260
|
+
roundingUnit,
|
|
10261
|
+
mode,
|
|
10262
|
+
roundedTotal,
|
|
10263
|
+
adjustment: round23(roundedTotal - total)
|
|
10264
|
+
};
|
|
10265
|
+
}
|
|
10245
10266
|
|
|
10246
10267
|
// src/tools/network.ts
|
|
10247
10268
|
var network_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ export { t as text } from './text-DWUcY8H1.cjs';
|
|
|
5
5
|
export { d as data } from './data-BJVJ879p.cjs';
|
|
6
6
|
export { g as generators } from './generators-Du8cBesn.cjs';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.cjs';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-cVnt1_f6.cjs';
|
|
9
9
|
export { n as network } from './network-DelcJeJa.cjs';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.cjs';
|
|
11
11
|
export { c as code } from './code-KXoRsHtl.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { t as text } from './text-DWUcY8H1.js';
|
|
|
5
5
|
export { d as data } from './data-BJVJ879p.js';
|
|
6
6
|
export { g as generators } from './generators-Du8cBesn.js';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.js';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-cVnt1_f6.js';
|
|
9
9
|
export { n as network } from './network-DelcJeJa.js';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.js';
|
|
11
11
|
export { c as code } from './code-KXoRsHtl.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { media_exports as media } from './chunk-226EH3ZI.js';
|
|
2
|
-
export { units_exports as units } from './chunk-
|
|
2
|
+
export { units_exports as units } from './chunk-24OT376F.js';
|
|
3
3
|
export { network_exports as network } from './chunk-Y7YY733Z.js';
|
|
4
4
|
export { api_exports as api } from './chunk-52ZDKSIX.js';
|
|
5
5
|
export { code_exports as code } from './chunk-JL7YTXRB.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -1983,6 +1983,26 @@ function calculateDepreciationSchedule(cost, salvageValue, usefulLifeYears, meth
|
|
|
1983
1983
|
schedule
|
|
1984
1984
|
};
|
|
1985
1985
|
}
|
|
1986
|
+
function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
1987
|
+
if (!Number.isFinite(total)) return { error: "total must be a finite number" };
|
|
1988
|
+
if (!Number.isFinite(roundingUnit) || roundingUnit <= 0) {
|
|
1989
|
+
return { error: "roundingUnit must be a finite number greater than zero" };
|
|
1990
|
+
}
|
|
1991
|
+
if (mode !== "nearest" && mode !== "up" && mode !== "down") {
|
|
1992
|
+
return { error: 'mode must be one of: "nearest", "up", "down"' };
|
|
1993
|
+
}
|
|
1994
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
1995
|
+
const steps = total / roundingUnit;
|
|
1996
|
+
const roundedSteps = mode === "up" ? Math.ceil(steps) : mode === "down" ? Math.floor(steps) : Math.round(steps);
|
|
1997
|
+
const roundedTotal = round22(roundedSteps * roundingUnit);
|
|
1998
|
+
return {
|
|
1999
|
+
total: round22(total),
|
|
2000
|
+
roundingUnit,
|
|
2001
|
+
mode,
|
|
2002
|
+
roundedTotal,
|
|
2003
|
+
adjustment: round22(roundedTotal - total)
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
1986
2006
|
|
|
1987
2007
|
exports.BASE_LABELS = BASE_LABELS;
|
|
1988
2008
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -2003,6 +2023,7 @@ exports.calcAspectRatio = calcAspectRatio;
|
|
|
2003
2023
|
exports.calcSubnet = calcSubnet;
|
|
2004
2024
|
exports.calculateBreakEven = calculateBreakEven;
|
|
2005
2025
|
exports.calculateCashBreakdown = calculateCashBreakdown;
|
|
2026
|
+
exports.calculateCashRounding = calculateCashRounding;
|
|
2006
2027
|
exports.calculateCdMaturity = calculateCdMaturity;
|
|
2007
2028
|
exports.calculateChange = calculateChange;
|
|
2008
2029
|
exports.calculateCompoundInterest = calculateCompoundInterest;
|
package/dist/tools/units.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CashBreakdownResult, w as CashChangeResult, x as CashDenominationItem, y as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CashBreakdownResult, w as CashChangeResult, x as CashDenominationItem, y as CashRoundingMode, z as CashRoundingResult, D as CdMaturityResult, E as CompareUnitPricesResult, F as CompoundInterestResult, G as CompoundYearRow, H as DepreciationMethod, I as DepreciationResult, J as DepreciationYear, K as Dimensions, L as DiscountField, M as DiscountInput, N as DiscountResult, O as EmiResult, P as EmiTenureUnit, Q as EmiYearlyBreakdownRow, R as FilePermissions, S as FormatOptions, T as IbanValidationResult, U as IpConversion, V as IsbnFormat, W as IsbnResult, X as LoanResult, Y as MarginMarkupField, Z as MarginMarkupInput, _ as MarginMarkupResult, $ as NotationStyle, a0 as NumberBase, a1 as PaybackPeriodInput, a2 as PaybackPeriodResult, a3 as PercentChangeDirection, a4 as PercentageChangeResult, a5 as Permission, a6 as PxConvertResult, a7 as RoiInput, a8 as RoiResult, a9 as RuleOf72Direction, aa as RuleOf72Result, ab as SavingsGoalInput, ac as SavingsGoalMode, ad as SavingsGoalResult, ae as SemverVersion, af as SimpleInterestResult, ag as SubnetInfo, ah as SuccessiveDiscountResult, ai as SuccessiveDiscountStep, aj as TaxDirection, ak as TaxResult, al as TimeValueDirection, am as TimeValueResult, an as TipSplitResult, ao as USD_DENOMINATIONS, ap as UnitPriceItem, aq as UnitPriceResult, ar as VideoBitrateInput, as as VideoBitrateMode, at as VideoBitrateResult, au as ViewportConvertResult, av as applySuccessiveDiscounts, aw as autoFormat, ax as bumpVersion, ay as calcAspectRatio, az as calcSubnet, aA as calculateBreakEven, aB as calculateCashBreakdown, aC as calculateCashRounding, aD as calculateCdMaturity, aE as calculateChange, aF as calculateCompoundInterest, aG as calculateDepreciationSchedule, aH as calculateDiscount, aI as calculateEmi, aJ as calculateLoan, aK as calculateMarginMarkup, aL as calculatePaybackPeriod, aM as calculatePercentageChange, aN as calculateRoi, aO as calculateRuleOf72, aP as calculateSavingsGoal, aQ as calculateSimpleInterest, aR as calculateTax, aS as calculateTimeValue, aT as calculateTipSplit, aU as calculateVideoBitrate, aV as compareSemver, aW as compareUnitPrices, aX as convert, aY as convertAprApy, aZ as convertBytes, a_ as convertIp, a$ as coverBox, b0 as decimalToIp, b1 as decimalToIpCidr, b2 as describePermissions, b3 as fitIntoBox, b4 as formatNumber, b5 as formatValue, b6 as formatVwValue, b7 as formatWithSeparator, b8 as gcd, b9 as ipFromBinary, ba as ipFromDecimal, bb as ipFromHex, bc as ipToBinary, bd as ipToDecimal, be as ipToDecimalCidr, bf as ipToHex, bg as ipToOctal, bh as isValid, bi as isValidCidr, bj as isValidIp, bk as isValidIpv4, bl as marginToMarkup, bm as markupToMargin, bn as octalToPermissions, bo as parseFileSize, bp as parseInput, bq as parseNumberString, br as parseSemver, bs as permissionsToChmod, bt as permissionsToOctal, bu as permissionsToSymbolic, bv as ptToPx, bw as pxToAll, bx as pxToViewport, by as remToPx, bz as satisfiesRange, bA as scaleByHeight, bB as scaleByWidth, bC as sortVersions, bD as splitSubnet, bE as symbolicToPermissions, bF as validateBarcode, bG as validateCardNumber, bH as validateIban, bI as validateIsbn, bJ as viewportToPx } from '../units-cVnt1_f6.cjs';
|
package/dist/tools/units.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CashBreakdownResult, w as CashChangeResult, x as CashDenominationItem, y as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CashBreakdownResult, w as CashChangeResult, x as CashDenominationItem, y as CashRoundingMode, z as CashRoundingResult, D as CdMaturityResult, E as CompareUnitPricesResult, F as CompoundInterestResult, G as CompoundYearRow, H as DepreciationMethod, I as DepreciationResult, J as DepreciationYear, K as Dimensions, L as DiscountField, M as DiscountInput, N as DiscountResult, O as EmiResult, P as EmiTenureUnit, Q as EmiYearlyBreakdownRow, R as FilePermissions, S as FormatOptions, T as IbanValidationResult, U as IpConversion, V as IsbnFormat, W as IsbnResult, X as LoanResult, Y as MarginMarkupField, Z as MarginMarkupInput, _ as MarginMarkupResult, $ as NotationStyle, a0 as NumberBase, a1 as PaybackPeriodInput, a2 as PaybackPeriodResult, a3 as PercentChangeDirection, a4 as PercentageChangeResult, a5 as Permission, a6 as PxConvertResult, a7 as RoiInput, a8 as RoiResult, a9 as RuleOf72Direction, aa as RuleOf72Result, ab as SavingsGoalInput, ac as SavingsGoalMode, ad as SavingsGoalResult, ae as SemverVersion, af as SimpleInterestResult, ag as SubnetInfo, ah as SuccessiveDiscountResult, ai as SuccessiveDiscountStep, aj as TaxDirection, ak as TaxResult, al as TimeValueDirection, am as TimeValueResult, an as TipSplitResult, ao as USD_DENOMINATIONS, ap as UnitPriceItem, aq as UnitPriceResult, ar as VideoBitrateInput, as as VideoBitrateMode, at as VideoBitrateResult, au as ViewportConvertResult, av as applySuccessiveDiscounts, aw as autoFormat, ax as bumpVersion, ay as calcAspectRatio, az as calcSubnet, aA as calculateBreakEven, aB as calculateCashBreakdown, aC as calculateCashRounding, aD as calculateCdMaturity, aE as calculateChange, aF as calculateCompoundInterest, aG as calculateDepreciationSchedule, aH as calculateDiscount, aI as calculateEmi, aJ as calculateLoan, aK as calculateMarginMarkup, aL as calculatePaybackPeriod, aM as calculatePercentageChange, aN as calculateRoi, aO as calculateRuleOf72, aP as calculateSavingsGoal, aQ as calculateSimpleInterest, aR as calculateTax, aS as calculateTimeValue, aT as calculateTipSplit, aU as calculateVideoBitrate, aV as compareSemver, aW as compareUnitPrices, aX as convert, aY as convertAprApy, aZ as convertBytes, a_ as convertIp, a$ as coverBox, b0 as decimalToIp, b1 as decimalToIpCidr, b2 as describePermissions, b3 as fitIntoBox, b4 as formatNumber, b5 as formatValue, b6 as formatVwValue, b7 as formatWithSeparator, b8 as gcd, b9 as ipFromBinary, ba as ipFromDecimal, bb as ipFromHex, bc as ipToBinary, bd as ipToDecimal, be as ipToDecimalCidr, bf as ipToHex, bg as ipToOctal, bh as isValid, bi as isValidCidr, bj as isValidIp, bk as isValidIpv4, bl as marginToMarkup, bm as markupToMargin, bn as octalToPermissions, bo as parseFileSize, bp as parseInput, bq as parseNumberString, br as parseSemver, bs as permissionsToChmod, bt as permissionsToOctal, bu as permissionsToSymbolic, bv as ptToPx, bw as pxToAll, bx as pxToViewport, by as remToPx, bz as satisfiesRange, bA as scaleByHeight, bB as scaleByWidth, bC as sortVersions, bD as splitSubnet, bE as symbolicToPermissions, bF as validateBarcode, bG as validateCardNumber, bH as validateIban, bI as validateIsbn, bJ as viewportToPx } from '../units-cVnt1_f6.js';
|
package/dist/tools/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-24OT376F.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -892,6 +892,25 @@ interface DepreciationResult {
|
|
|
892
892
|
declare function calculateDepreciationSchedule(cost: number, salvageValue: number, usefulLifeYears: number, method: DepreciationMethod): DepreciationResult | {
|
|
893
893
|
error: string;
|
|
894
894
|
};
|
|
895
|
+
type CashRoundingMode = "nearest" | "up" | "down";
|
|
896
|
+
interface CashRoundingResult {
|
|
897
|
+
total: number;
|
|
898
|
+
roundingUnit: number;
|
|
899
|
+
mode: CashRoundingMode;
|
|
900
|
+
roundedTotal: number;
|
|
901
|
+
adjustment: number;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Round a cashless total to the nearest payable cash denomination, the way
|
|
905
|
+
* a till rounds a card-priced total to the nearest 5 cents (or whatever the
|
|
906
|
+
* smallest circulating coin is) when settling in physical cash. This is
|
|
907
|
+
* commonly called "Swedish rounding" or "cash rounding", and is distinct
|
|
908
|
+
* from the Cash Denomination / Till Calculator, which breaks a total into
|
|
909
|
+
* bill/coin counts rather than adjusting the total itself.
|
|
910
|
+
*/
|
|
911
|
+
declare function calculateCashRounding(total: number, roundingUnit: number, mode?: CashRoundingMode): CashRoundingResult | {
|
|
912
|
+
error: string;
|
|
913
|
+
};
|
|
895
914
|
|
|
896
915
|
type units_AmortizationRow = AmortizationRow;
|
|
897
916
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -919,6 +938,8 @@ type units_CardValidationResult = CardValidationResult;
|
|
|
919
938
|
type units_CashBreakdownResult = CashBreakdownResult;
|
|
920
939
|
type units_CashChangeResult = CashChangeResult;
|
|
921
940
|
type units_CashDenominationItem = CashDenominationItem;
|
|
941
|
+
type units_CashRoundingMode = CashRoundingMode;
|
|
942
|
+
type units_CashRoundingResult = CashRoundingResult;
|
|
922
943
|
type units_CdMaturityResult = CdMaturityResult;
|
|
923
944
|
type units_CompareUnitPricesResult = CompareUnitPricesResult;
|
|
924
945
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
@@ -982,6 +1003,7 @@ declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
|
982
1003
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
983
1004
|
declare const units_calculateBreakEven: typeof calculateBreakEven;
|
|
984
1005
|
declare const units_calculateCashBreakdown: typeof calculateCashBreakdown;
|
|
1006
|
+
declare const units_calculateCashRounding: typeof calculateCashRounding;
|
|
985
1007
|
declare const units_calculateCdMaturity: typeof calculateCdMaturity;
|
|
986
1008
|
declare const units_calculateChange: typeof calculateChange;
|
|
987
1009
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
@@ -1054,7 +1076,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1054
1076
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1055
1077
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1056
1078
|
declare namespace units {
|
|
1057
|
-
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1079
|
+
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1058
1080
|
}
|
|
1059
1081
|
|
|
1060
|
-
export { type
|
|
1082
|
+
export { type NotationStyle as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CdMaturityResult as D, type CompareUnitPricesResult as E, type CompoundInterestResult as F, type CompoundYearRow as G, type DepreciationMethod as H, type DepreciationResult as I, type DepreciationYear as J, type Dimensions as K, type DiscountField as L, type DiscountInput as M, type DiscountResult as N, type EmiResult as O, type EmiTenureUnit as P, type EmiYearlyBreakdownRow as Q, type FilePermissions as R, type FormatOptions as S, type IbanValidationResult as T, type IpConversion as U, type IsbnFormat as V, type IsbnResult as W, type LoanResult as X, type MarginMarkupField as Y, type MarginMarkupInput as Z, type MarginMarkupResult as _, type AprApyDirection as a, coverBox as a$, type NumberBase as a0, type PaybackPeriodInput as a1, type PaybackPeriodResult as a2, type PercentChangeDirection as a3, type PercentageChangeResult as a4, type Permission as a5, type PxConvertResult as a6, type RoiInput as a7, type RoiResult as a8, type RuleOf72Direction as a9, calculateBreakEven as aA, calculateCashBreakdown as aB, calculateCashRounding as aC, calculateCdMaturity as aD, calculateChange as aE, calculateCompoundInterest as aF, calculateDepreciationSchedule as aG, calculateDiscount as aH, calculateEmi as aI, calculateLoan as aJ, calculateMarginMarkup as aK, calculatePaybackPeriod as aL, calculatePercentageChange as aM, calculateRoi as aN, calculateRuleOf72 as aO, calculateSavingsGoal as aP, calculateSimpleInterest as aQ, calculateTax as aR, calculateTimeValue as aS, calculateTipSplit as aT, calculateVideoBitrate as aU, compareSemver as aV, compareUnitPrices as aW, convert as aX, convertAprApy as aY, convertBytes as aZ, convertIp as a_, type RuleOf72Result as aa, type SavingsGoalInput as ab, type SavingsGoalMode as ac, type SavingsGoalResult as ad, type SemverVersion as ae, type SimpleInterestResult as af, type SubnetInfo as ag, type SuccessiveDiscountResult as ah, type SuccessiveDiscountStep as ai, type TaxDirection as aj, type TaxResult as ak, type TimeValueDirection as al, type TimeValueResult as am, type TipSplitResult as an, USD_DENOMINATIONS as ao, type UnitPriceItem as ap, type UnitPriceResult as aq, type VideoBitrateInput as ar, type VideoBitrateMode as as, type VideoBitrateResult as at, type ViewportConvertResult as au, applySuccessiveDiscounts as av, autoFormat as aw, bumpVersion as ax, calcAspectRatio as ay, calcSubnet as az, type AprApyResult as b, decimalToIp as b0, decimalToIpCidr as b1, describePermissions as b2, fitIntoBox as b3, formatNumber as b4, formatValue as b5, formatVwValue as b6, formatWithSeparator as b7, gcd as b8, ipFromBinary as b9, scaleByHeight as bA, scaleByWidth as bB, sortVersions as bC, splitSubnet as bD, symbolicToPermissions as bE, validateBarcode as bF, validateCardNumber as bG, validateIban as bH, validateIsbn as bI, viewportToPx as bJ, ipFromDecimal as ba, ipFromHex as bb, ipToBinary as bc, ipToDecimal as bd, ipToDecimalCidr as be, ipToHex as bf, ipToOctal as bg, isValid as bh, isValidCidr as bi, isValidIp as bj, isValidIpv4 as bk, marginToMarkup as bl, markupToMargin as bm, octalToPermissions as bn, parseFileSize as bo, parseInput as bp, parseNumberString as bq, parseSemver as br, permissionsToChmod as bs, permissionsToOctal as bt, permissionsToSymbolic as bu, ptToPx as bv, pxToAll as bw, pxToViewport as bx, remToPx as by, satisfiesRange as bz, type AspectRatioResult as c, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BreakEvenInput as i, type BreakEvenResult as j, type ByteConvertResult as k, type ByteUnit as l, COMMON_LOCALES as m, COMMON_PERMISSIONS as n, COMMON_RATIOS as o, COMMON_SIZES as p, COMMON_TAX_RATES as q, COMMON_TIP_PERCENTAGES as r, COMMON_VIEWPORTS as s, type CardValidationResult as t, units as u, type CashBreakdownResult as v, type CashChangeResult as w, type CashDenominationItem as x, type CashRoundingMode as y, type CashRoundingResult as z };
|
|
@@ -892,6 +892,25 @@ interface DepreciationResult {
|
|
|
892
892
|
declare function calculateDepreciationSchedule(cost: number, salvageValue: number, usefulLifeYears: number, method: DepreciationMethod): DepreciationResult | {
|
|
893
893
|
error: string;
|
|
894
894
|
};
|
|
895
|
+
type CashRoundingMode = "nearest" | "up" | "down";
|
|
896
|
+
interface CashRoundingResult {
|
|
897
|
+
total: number;
|
|
898
|
+
roundingUnit: number;
|
|
899
|
+
mode: CashRoundingMode;
|
|
900
|
+
roundedTotal: number;
|
|
901
|
+
adjustment: number;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Round a cashless total to the nearest payable cash denomination, the way
|
|
905
|
+
* a till rounds a card-priced total to the nearest 5 cents (or whatever the
|
|
906
|
+
* smallest circulating coin is) when settling in physical cash. This is
|
|
907
|
+
* commonly called "Swedish rounding" or "cash rounding", and is distinct
|
|
908
|
+
* from the Cash Denomination / Till Calculator, which breaks a total into
|
|
909
|
+
* bill/coin counts rather than adjusting the total itself.
|
|
910
|
+
*/
|
|
911
|
+
declare function calculateCashRounding(total: number, roundingUnit: number, mode?: CashRoundingMode): CashRoundingResult | {
|
|
912
|
+
error: string;
|
|
913
|
+
};
|
|
895
914
|
|
|
896
915
|
type units_AmortizationRow = AmortizationRow;
|
|
897
916
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -919,6 +938,8 @@ type units_CardValidationResult = CardValidationResult;
|
|
|
919
938
|
type units_CashBreakdownResult = CashBreakdownResult;
|
|
920
939
|
type units_CashChangeResult = CashChangeResult;
|
|
921
940
|
type units_CashDenominationItem = CashDenominationItem;
|
|
941
|
+
type units_CashRoundingMode = CashRoundingMode;
|
|
942
|
+
type units_CashRoundingResult = CashRoundingResult;
|
|
922
943
|
type units_CdMaturityResult = CdMaturityResult;
|
|
923
944
|
type units_CompareUnitPricesResult = CompareUnitPricesResult;
|
|
924
945
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
@@ -982,6 +1003,7 @@ declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
|
982
1003
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
983
1004
|
declare const units_calculateBreakEven: typeof calculateBreakEven;
|
|
984
1005
|
declare const units_calculateCashBreakdown: typeof calculateCashBreakdown;
|
|
1006
|
+
declare const units_calculateCashRounding: typeof calculateCashRounding;
|
|
985
1007
|
declare const units_calculateCdMaturity: typeof calculateCdMaturity;
|
|
986
1008
|
declare const units_calculateChange: typeof calculateChange;
|
|
987
1009
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
@@ -1054,7 +1076,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1054
1076
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1055
1077
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1056
1078
|
declare namespace units {
|
|
1057
|
-
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1079
|
+
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1058
1080
|
}
|
|
1059
1081
|
|
|
1060
|
-
export { type
|
|
1082
|
+
export { type NotationStyle as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CdMaturityResult as D, type CompareUnitPricesResult as E, type CompoundInterestResult as F, type CompoundYearRow as G, type DepreciationMethod as H, type DepreciationResult as I, type DepreciationYear as J, type Dimensions as K, type DiscountField as L, type DiscountInput as M, type DiscountResult as N, type EmiResult as O, type EmiTenureUnit as P, type EmiYearlyBreakdownRow as Q, type FilePermissions as R, type FormatOptions as S, type IbanValidationResult as T, type IpConversion as U, type IsbnFormat as V, type IsbnResult as W, type LoanResult as X, type MarginMarkupField as Y, type MarginMarkupInput as Z, type MarginMarkupResult as _, type AprApyDirection as a, coverBox as a$, type NumberBase as a0, type PaybackPeriodInput as a1, type PaybackPeriodResult as a2, type PercentChangeDirection as a3, type PercentageChangeResult as a4, type Permission as a5, type PxConvertResult as a6, type RoiInput as a7, type RoiResult as a8, type RuleOf72Direction as a9, calculateBreakEven as aA, calculateCashBreakdown as aB, calculateCashRounding as aC, calculateCdMaturity as aD, calculateChange as aE, calculateCompoundInterest as aF, calculateDepreciationSchedule as aG, calculateDiscount as aH, calculateEmi as aI, calculateLoan as aJ, calculateMarginMarkup as aK, calculatePaybackPeriod as aL, calculatePercentageChange as aM, calculateRoi as aN, calculateRuleOf72 as aO, calculateSavingsGoal as aP, calculateSimpleInterest as aQ, calculateTax as aR, calculateTimeValue as aS, calculateTipSplit as aT, calculateVideoBitrate as aU, compareSemver as aV, compareUnitPrices as aW, convert as aX, convertAprApy as aY, convertBytes as aZ, convertIp as a_, type RuleOf72Result as aa, type SavingsGoalInput as ab, type SavingsGoalMode as ac, type SavingsGoalResult as ad, type SemverVersion as ae, type SimpleInterestResult as af, type SubnetInfo as ag, type SuccessiveDiscountResult as ah, type SuccessiveDiscountStep as ai, type TaxDirection as aj, type TaxResult as ak, type TimeValueDirection as al, type TimeValueResult as am, type TipSplitResult as an, USD_DENOMINATIONS as ao, type UnitPriceItem as ap, type UnitPriceResult as aq, type VideoBitrateInput as ar, type VideoBitrateMode as as, type VideoBitrateResult as at, type ViewportConvertResult as au, applySuccessiveDiscounts as av, autoFormat as aw, bumpVersion as ax, calcAspectRatio as ay, calcSubnet as az, type AprApyResult as b, decimalToIp as b0, decimalToIpCidr as b1, describePermissions as b2, fitIntoBox as b3, formatNumber as b4, formatValue as b5, formatVwValue as b6, formatWithSeparator as b7, gcd as b8, ipFromBinary as b9, scaleByHeight as bA, scaleByWidth as bB, sortVersions as bC, splitSubnet as bD, symbolicToPermissions as bE, validateBarcode as bF, validateCardNumber as bG, validateIban as bH, validateIsbn as bI, viewportToPx as bJ, ipFromDecimal as ba, ipFromHex as bb, ipToBinary as bc, ipToDecimal as bd, ipToDecimalCidr as be, ipToHex as bf, ipToOctal as bg, isValid as bh, isValidCidr as bi, isValidIp as bj, isValidIpv4 as bk, marginToMarkup as bl, markupToMargin as bm, octalToPermissions as bn, parseFileSize as bo, parseInput as bp, parseNumberString as bq, parseSemver as br, permissionsToChmod as bs, permissionsToOctal as bt, permissionsToSymbolic as bu, ptToPx as bv, pxToAll as bw, pxToViewport as bx, remToPx as by, satisfiesRange as bz, type AspectRatioResult as c, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BreakEvenInput as i, type BreakEvenResult as j, type ByteConvertResult as k, type ByteUnit as l, COMMON_LOCALES as m, COMMON_PERMISSIONS as n, COMMON_RATIOS as o, COMMON_SIZES as p, COMMON_TAX_RATES as q, COMMON_TIP_PERCENTAGES as r, COMMON_VIEWPORTS as s, type CardValidationResult as t, units as u, type CashBreakdownResult as v, type CashChangeResult as w, type CashDenominationItem as x, type CashRoundingMode as y, type CashRoundingResult as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilix-tech/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "154+ developer utility tools for Node.js: JSON, encoding, hashing, color, CSS, network and more. Runs locally, no API key required.",
|
|
5
5
|
"author": "Utilix <hello@utilix.tech>",
|
|
6
6
|
"license": "MIT",
|