@utilix-tech/sdk 0.23.0 → 0.25.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 +8 -0
- package/README.md +31 -8
- package/dist/{chunk-TINQFTLO.js → chunk-66QHV5KW.js} +178 -1
- package/dist/{chunk-2I4O5YCT.js → chunk-AFEZ6N4A.js} +43 -1
- package/dist/{chunk-AIKSKJ77.js → chunk-FVKNR3PV.js} +126 -1
- package/dist/{data-D8XTI7Du.d.ts → data-XRb0D7Zn.d.cts} +75 -2
- package/dist/{data-D8XTI7Du.d.cts → data-XRb0D7Zn.d.ts} +75 -2
- package/dist/index.cjs +344 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{text-DS70aMY5.d.cts → text-D1fySkCB.d.cts} +30 -2
- package/dist/{text-DS70aMY5.d.ts → text-D1fySkCB.d.ts} +30 -2
- package/dist/tools/data.cjs +177 -0
- package/dist/tools/data.d.cts +1 -1
- package/dist/tools/data.d.ts +1 -1
- package/dist/tools/data.js +1 -1
- package/dist/tools/text.cjs +42 -0
- package/dist/tools/text.d.cts +1 -1
- package/dist/tools/text.d.ts +1 -1
- package/dist/tools/text.js +1 -1
- package/dist/tools/units.cjs +125 -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-h4rHQGp5.d.cts → units-DUqjk24x.d.cts} +95 -2
- package/dist/{units-h4rHQGp5.d.ts → units-DUqjk24x.d.ts} +95 -2
- package/package.json +1 -1
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
|
|
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 CompoundInterestResult, w as CompoundYearRow, D as Dimensions, x as DiscountField, y as DiscountInput, z as DiscountResult, F as FilePermissions, E as FormatOptions, I as IbanValidationResult, G as IpConversion, H as IsbnFormat, J as IsbnResult, L as LoanResult, M as MarginMarkupField, K as MarginMarkupInput, N as MarginMarkupResult, O as NotationStyle, P as NumberBase, Q as PercentChangeDirection, R as PercentageChangeResult, S as Permission, T as PxConvertResult, U as SemverVersion, V as SimpleInterestResult, W as SubnetInfo, X as SuccessiveDiscountResult, Y as SuccessiveDiscountStep, Z as TaxDirection, _ as TaxResult, $ as TimeValueDirection, a0 as TimeValueResult, a1 as TipSplitResult, a2 as ViewportConvertResult, a3 as applySuccessiveDiscounts, a4 as autoFormat, a5 as bumpVersion, a6 as calcAspectRatio, a7 as calcSubnet, a8 as calculateBreakEven, a9 as calculateCompoundInterest, aa as calculateDiscount, ab as calculateLoan, ac as calculateMarginMarkup, ad as calculatePercentageChange, ae as calculateSimpleInterest, af as calculateTax, ag as calculateTimeValue, ah as calculateTipSplit, ai as compareSemver, aj as convert, ak as convertAprApy, al as convertBytes, am as convertIp, an as coverBox, ao as decimalToIp, ap as decimalToIpCidr, aq as describePermissions, ar as fitIntoBox, as as formatNumber, at as formatValue, au as formatVwValue, av as formatWithSeparator, aw as gcd, ax as ipFromBinary, ay as ipFromDecimal, az as ipFromHex, aA as ipToBinary, aB as ipToDecimal, aC as ipToDecimalCidr, aD as ipToHex, aE as ipToOctal, aF as isValid, aG as isValidCidr, aH as isValidIp, aI as isValidIpv4, aJ as marginToMarkup, aK as markupToMargin, aL as octalToPermissions, aM as parseFileSize, aN as parseInput, aO as parseNumberString, aP as parseSemver, aQ as permissionsToChmod, aR as permissionsToOctal, aS as permissionsToSymbolic, aT as ptToPx, aU as pxToAll, aV as pxToViewport, aW as remToPx, aX as satisfiesRange, aY as scaleByHeight, aZ as scaleByWidth, a_ as sortVersions, a$ as splitSubnet, b0 as symbolicToPermissions, b1 as validateBarcode, b2 as validateCardNumber, b3 as validateIban, b4 as validateIsbn, b5 as viewportToPx } from '../units-DUqjk24x.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
|
|
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 CompoundInterestResult, w as CompoundYearRow, D as Dimensions, x as DiscountField, y as DiscountInput, z as DiscountResult, F as FilePermissions, E as FormatOptions, I as IbanValidationResult, G as IpConversion, H as IsbnFormat, J as IsbnResult, L as LoanResult, M as MarginMarkupField, K as MarginMarkupInput, N as MarginMarkupResult, O as NotationStyle, P as NumberBase, Q as PercentChangeDirection, R as PercentageChangeResult, S as Permission, T as PxConvertResult, U as SemverVersion, V as SimpleInterestResult, W as SubnetInfo, X as SuccessiveDiscountResult, Y as SuccessiveDiscountStep, Z as TaxDirection, _ as TaxResult, $ as TimeValueDirection, a0 as TimeValueResult, a1 as TipSplitResult, a2 as ViewportConvertResult, a3 as applySuccessiveDiscounts, a4 as autoFormat, a5 as bumpVersion, a6 as calcAspectRatio, a7 as calcSubnet, a8 as calculateBreakEven, a9 as calculateCompoundInterest, aa as calculateDiscount, ab as calculateLoan, ac as calculateMarginMarkup, ad as calculatePercentageChange, ae as calculateSimpleInterest, af as calculateTax, ag as calculateTimeValue, ah as calculateTipSplit, ai as compareSemver, aj as convert, ak as convertAprApy, al as convertBytes, am as convertIp, an as coverBox, ao as decimalToIp, ap as decimalToIpCidr, aq as describePermissions, ar as fitIntoBox, as as formatNumber, at as formatValue, au as formatVwValue, av as formatWithSeparator, aw as gcd, ax as ipFromBinary, ay as ipFromDecimal, az as ipFromHex, aA as ipToBinary, aB as ipToDecimal, aC as ipToDecimalCidr, aD as ipToHex, aE as ipToOctal, aF as isValid, aG as isValidCidr, aH as isValidIp, aI as isValidIpv4, aJ as marginToMarkup, aK as markupToMargin, aL as octalToPermissions, aM as parseFileSize, aN as parseInput, aO as parseNumberString, aP as parseSemver, aQ as permissionsToChmod, aR as permissionsToOctal, aS as permissionsToSymbolic, aT as ptToPx, aU as pxToAll, aV as pxToViewport, aW as remToPx, aX as satisfiesRange, aY as scaleByHeight, aZ as scaleByWidth, a_ as sortVersions, a$ as splitSubnet, b0 as symbolicToPermissions, b1 as validateBarcode, b2 as validateCardNumber, b3 as validateIban, b4 as validateIsbn, b5 as viewportToPx } from '../units-DUqjk24x.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, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateCompoundInterest, calculateLoan, calculateMarginMarkup, calculatePercentageChange, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, compareSemver, 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, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCompoundInterest, calculateDiscount, calculateLoan, calculateMarginMarkup, calculatePercentageChange, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, compareSemver, 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-FVKNR3PV.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
* - percentage-change-calculator : calculatePercentageChange
|
|
26
26
|
* - apr-apy-converter : convertAprApy
|
|
27
27
|
* - margin-markup-calculator : calculateMarginMarkup, marginToMarkup, markupToMargin
|
|
28
|
+
* - discount-calculator : calculateDiscount, applySuccessiveDiscounts
|
|
29
|
+
* - break-even-calculator : calculateBreakEven
|
|
28
30
|
*/
|
|
29
31
|
interface PxConvertResult {
|
|
30
32
|
px: number;
|
|
@@ -511,6 +513,87 @@ declare function marginToMarkup(marginPercent: number): number | {
|
|
|
511
513
|
declare function markupToMargin(markupPercent: number): number | {
|
|
512
514
|
error: string;
|
|
513
515
|
};
|
|
516
|
+
type DiscountField = "discountPercent" | "discountAmount" | "finalPrice";
|
|
517
|
+
interface DiscountInput {
|
|
518
|
+
originalPrice?: number | null;
|
|
519
|
+
discountPercent?: number | null;
|
|
520
|
+
discountAmount?: number | null;
|
|
521
|
+
finalPrice?: number | null;
|
|
522
|
+
}
|
|
523
|
+
interface DiscountResult {
|
|
524
|
+
originalPrice: number;
|
|
525
|
+
finalPrice: number;
|
|
526
|
+
discountAmount: number;
|
|
527
|
+
discountPercent: number;
|
|
528
|
+
given: DiscountField;
|
|
529
|
+
solvedFor: DiscountField[];
|
|
530
|
+
}
|
|
531
|
+
interface SuccessiveDiscountStep {
|
|
532
|
+
discountPercent: number;
|
|
533
|
+
priceBefore: number;
|
|
534
|
+
priceAfter: number;
|
|
535
|
+
saved: number;
|
|
536
|
+
}
|
|
537
|
+
interface SuccessiveDiscountResult {
|
|
538
|
+
originalPrice: number;
|
|
539
|
+
finalPrice: number;
|
|
540
|
+
totalSaved: number;
|
|
541
|
+
effectiveDiscountPercent: number;
|
|
542
|
+
sumOfDiscountPercents: number;
|
|
543
|
+
steps: SuccessiveDiscountStep[];
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Supply the original price plus exactly one of discountPercent,
|
|
547
|
+
* discountAmount, or finalPrice; the other two are derived. A discount cannot
|
|
548
|
+
* exceed the original price, so a final price above the original or a percent
|
|
549
|
+
* above 100 is rejected rather than silently returning a negative amount.
|
|
550
|
+
* Pure arithmetic over user-supplied numbers, no live price feed.
|
|
551
|
+
*/
|
|
552
|
+
declare function calculateDiscount(input: DiscountInput): DiscountResult | {
|
|
553
|
+
error: string;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* Apply discounts one after another, each off the running price. Stacked
|
|
557
|
+
* discounts never simply add up: 20% then 10% leaves 72% of the original, an
|
|
558
|
+
* effective 28% discount, not 30%. Returns each step plus the effective single
|
|
559
|
+
* discount that would produce the same final price.
|
|
560
|
+
*/
|
|
561
|
+
declare function applySuccessiveDiscounts(originalPrice: number, discountPercents: number[]): SuccessiveDiscountResult | {
|
|
562
|
+
error: string;
|
|
563
|
+
};
|
|
564
|
+
interface BreakEvenInput {
|
|
565
|
+
fixedCosts: number;
|
|
566
|
+
variableCostPerUnit: number;
|
|
567
|
+
pricePerUnit: number;
|
|
568
|
+
salesVolume?: number | null;
|
|
569
|
+
}
|
|
570
|
+
interface BreakEvenResult {
|
|
571
|
+
fixedCosts: number;
|
|
572
|
+
variableCostPerUnit: number;
|
|
573
|
+
pricePerUnit: number;
|
|
574
|
+
contributionMarginPerUnit: number;
|
|
575
|
+
contributionMarginRatio: number;
|
|
576
|
+
breakEvenUnits: number;
|
|
577
|
+
breakEvenUnitsRounded: number;
|
|
578
|
+
breakEvenRevenue: number;
|
|
579
|
+
salesVolume?: number;
|
|
580
|
+
revenueAtSalesVolume?: number;
|
|
581
|
+
profitAtSalesVolume?: number;
|
|
582
|
+
marginOfSafetyUnits?: number;
|
|
583
|
+
marginOfSafetyPercent?: number;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* From fixed costs, the variable cost per unit, and the selling price per
|
|
587
|
+
* unit, compute the break-even point: the unit count and revenue at which
|
|
588
|
+
* profit is exactly zero. The price must exceed the variable cost, since
|
|
589
|
+
* otherwise every unit sold loses money and break-even is never reached no
|
|
590
|
+
* matter the volume. Optionally pass a sales volume to also get the profit
|
|
591
|
+
* (or loss) at that volume and the margin of safety above break-even. Pure
|
|
592
|
+
* arithmetic, no live cost/pricing feed.
|
|
593
|
+
*/
|
|
594
|
+
declare function calculateBreakEven(input: BreakEvenInput): BreakEvenResult | {
|
|
595
|
+
error: string;
|
|
596
|
+
};
|
|
514
597
|
|
|
515
598
|
type units_AmortizationRow = AmortizationRow;
|
|
516
599
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -522,6 +605,8 @@ declare const units_BYTE_UNITS: typeof BYTE_UNITS;
|
|
|
522
605
|
type units_BarcodeFormat = BarcodeFormat;
|
|
523
606
|
type units_BarcodeValidationResult = BarcodeValidationResult;
|
|
524
607
|
type units_BaseConvertResult = BaseConvertResult;
|
|
608
|
+
type units_BreakEvenInput = BreakEvenInput;
|
|
609
|
+
type units_BreakEvenResult = BreakEvenResult;
|
|
525
610
|
type units_ByteConvertResult = ByteConvertResult;
|
|
526
611
|
type units_ByteUnit = ByteUnit;
|
|
527
612
|
declare const units_COMMON_CURRENCIES: typeof COMMON_CURRENCIES;
|
|
@@ -536,6 +621,9 @@ type units_CardValidationResult = CardValidationResult;
|
|
|
536
621
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
537
622
|
type units_CompoundYearRow = CompoundYearRow;
|
|
538
623
|
type units_Dimensions = Dimensions;
|
|
624
|
+
type units_DiscountField = DiscountField;
|
|
625
|
+
type units_DiscountInput = DiscountInput;
|
|
626
|
+
type units_DiscountResult = DiscountResult;
|
|
539
627
|
type units_FilePermissions = FilePermissions;
|
|
540
628
|
type units_FormatOptions = FormatOptions;
|
|
541
629
|
type units_IbanValidationResult = IbanValidationResult;
|
|
@@ -555,17 +643,22 @@ type units_PxConvertResult = PxConvertResult;
|
|
|
555
643
|
type units_SemverVersion = SemverVersion;
|
|
556
644
|
type units_SimpleInterestResult = SimpleInterestResult;
|
|
557
645
|
type units_SubnetInfo = SubnetInfo;
|
|
646
|
+
type units_SuccessiveDiscountResult = SuccessiveDiscountResult;
|
|
647
|
+
type units_SuccessiveDiscountStep = SuccessiveDiscountStep;
|
|
558
648
|
type units_TaxDirection = TaxDirection;
|
|
559
649
|
type units_TaxResult = TaxResult;
|
|
560
650
|
type units_TimeValueDirection = TimeValueDirection;
|
|
561
651
|
type units_TimeValueResult = TimeValueResult;
|
|
562
652
|
type units_TipSplitResult = TipSplitResult;
|
|
563
653
|
type units_ViewportConvertResult = ViewportConvertResult;
|
|
654
|
+
declare const units_applySuccessiveDiscounts: typeof applySuccessiveDiscounts;
|
|
564
655
|
declare const units_autoFormat: typeof autoFormat;
|
|
565
656
|
declare const units_bumpVersion: typeof bumpVersion;
|
|
566
657
|
declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
567
658
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
659
|
+
declare const units_calculateBreakEven: typeof calculateBreakEven;
|
|
568
660
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
661
|
+
declare const units_calculateDiscount: typeof calculateDiscount;
|
|
569
662
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
570
663
|
declare const units_calculateMarginMarkup: typeof calculateMarginMarkup;
|
|
571
664
|
declare const units_calculatePercentageChange: typeof calculatePercentageChange;
|
|
@@ -626,7 +719,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
626
719
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
627
720
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
628
721
|
declare namespace units {
|
|
629
|
-
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_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_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_Dimensions as Dimensions, 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_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, 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, type units_ViewportConvertResult as ViewportConvertResult, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePercentageChange as calculatePercentageChange, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_compareSemver as compareSemver, 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 };
|
|
722
|
+
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_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, 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_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, 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, 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_calculateCompoundInterest as calculateCompoundInterest, units_calculateDiscount as calculateDiscount, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePercentageChange as calculatePercentageChange, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_compareSemver as compareSemver, 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 };
|
|
630
723
|
}
|
|
631
724
|
|
|
632
|
-
export {
|
|
725
|
+
export { type TimeValueDirection as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type Dimensions as D, type FormatOptions as E, type FilePermissions as F, type IpConversion as G, type IsbnFormat as H, type IbanValidationResult as I, type IsbnResult as J, type MarginMarkupInput as K, type LoanResult as L, type MarginMarkupField as M, type MarginMarkupResult as N, type NotationStyle as O, type NumberBase as P, type PercentChangeDirection as Q, type PercentageChangeResult as R, type Permission as S, type PxConvertResult as T, type SemverVersion as U, type SimpleInterestResult as V, type SubnetInfo as W, type SuccessiveDiscountResult as X, type SuccessiveDiscountStep as Y, type TaxDirection as Z, type TaxResult as _, type AprApyDirection as a, splitSubnet as a$, type TimeValueResult as a0, type TipSplitResult as a1, type ViewportConvertResult as a2, applySuccessiveDiscounts as a3, autoFormat as a4, bumpVersion as a5, calcAspectRatio as a6, calcSubnet as a7, calculateBreakEven as a8, calculateCompoundInterest as a9, ipToBinary as aA, ipToDecimal as aB, ipToDecimalCidr as aC, ipToHex as aD, ipToOctal as aE, isValid as aF, isValidCidr as aG, isValidIp as aH, isValidIpv4 as aI, marginToMarkup as aJ, markupToMargin as aK, octalToPermissions as aL, parseFileSize as aM, parseInput as aN, parseNumberString as aO, parseSemver as aP, permissionsToChmod as aQ, permissionsToOctal as aR, permissionsToSymbolic as aS, ptToPx as aT, pxToAll as aU, pxToViewport as aV, remToPx as aW, satisfiesRange as aX, scaleByHeight as aY, scaleByWidth as aZ, sortVersions as a_, calculateDiscount as aa, calculateLoan as ab, calculateMarginMarkup as ac, calculatePercentageChange as ad, calculateSimpleInterest as ae, calculateTax as af, calculateTimeValue as ag, calculateTipSplit as ah, compareSemver as ai, convert as aj, convertAprApy as ak, convertBytes as al, convertIp as am, coverBox as an, decimalToIp as ao, decimalToIpCidr as ap, describePermissions as aq, fitIntoBox as ar, formatNumber as as, formatValue as at, formatVwValue as au, formatWithSeparator as av, gcd as aw, ipFromBinary as ax, ipFromDecimal as ay, ipFromHex as az, type AprApyResult as b, symbolicToPermissions as b0, validateBarcode as b1, validateCardNumber as b2, validateIban as b3, validateIsbn as b4, viewportToPx as b5, 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 CompoundInterestResult as v, type CompoundYearRow as w, type DiscountField as x, type DiscountInput as y, type DiscountResult as z };
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
* - percentage-change-calculator : calculatePercentageChange
|
|
26
26
|
* - apr-apy-converter : convertAprApy
|
|
27
27
|
* - margin-markup-calculator : calculateMarginMarkup, marginToMarkup, markupToMargin
|
|
28
|
+
* - discount-calculator : calculateDiscount, applySuccessiveDiscounts
|
|
29
|
+
* - break-even-calculator : calculateBreakEven
|
|
28
30
|
*/
|
|
29
31
|
interface PxConvertResult {
|
|
30
32
|
px: number;
|
|
@@ -511,6 +513,87 @@ declare function marginToMarkup(marginPercent: number): number | {
|
|
|
511
513
|
declare function markupToMargin(markupPercent: number): number | {
|
|
512
514
|
error: string;
|
|
513
515
|
};
|
|
516
|
+
type DiscountField = "discountPercent" | "discountAmount" | "finalPrice";
|
|
517
|
+
interface DiscountInput {
|
|
518
|
+
originalPrice?: number | null;
|
|
519
|
+
discountPercent?: number | null;
|
|
520
|
+
discountAmount?: number | null;
|
|
521
|
+
finalPrice?: number | null;
|
|
522
|
+
}
|
|
523
|
+
interface DiscountResult {
|
|
524
|
+
originalPrice: number;
|
|
525
|
+
finalPrice: number;
|
|
526
|
+
discountAmount: number;
|
|
527
|
+
discountPercent: number;
|
|
528
|
+
given: DiscountField;
|
|
529
|
+
solvedFor: DiscountField[];
|
|
530
|
+
}
|
|
531
|
+
interface SuccessiveDiscountStep {
|
|
532
|
+
discountPercent: number;
|
|
533
|
+
priceBefore: number;
|
|
534
|
+
priceAfter: number;
|
|
535
|
+
saved: number;
|
|
536
|
+
}
|
|
537
|
+
interface SuccessiveDiscountResult {
|
|
538
|
+
originalPrice: number;
|
|
539
|
+
finalPrice: number;
|
|
540
|
+
totalSaved: number;
|
|
541
|
+
effectiveDiscountPercent: number;
|
|
542
|
+
sumOfDiscountPercents: number;
|
|
543
|
+
steps: SuccessiveDiscountStep[];
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Supply the original price plus exactly one of discountPercent,
|
|
547
|
+
* discountAmount, or finalPrice; the other two are derived. A discount cannot
|
|
548
|
+
* exceed the original price, so a final price above the original or a percent
|
|
549
|
+
* above 100 is rejected rather than silently returning a negative amount.
|
|
550
|
+
* Pure arithmetic over user-supplied numbers, no live price feed.
|
|
551
|
+
*/
|
|
552
|
+
declare function calculateDiscount(input: DiscountInput): DiscountResult | {
|
|
553
|
+
error: string;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* Apply discounts one after another, each off the running price. Stacked
|
|
557
|
+
* discounts never simply add up: 20% then 10% leaves 72% of the original, an
|
|
558
|
+
* effective 28% discount, not 30%. Returns each step plus the effective single
|
|
559
|
+
* discount that would produce the same final price.
|
|
560
|
+
*/
|
|
561
|
+
declare function applySuccessiveDiscounts(originalPrice: number, discountPercents: number[]): SuccessiveDiscountResult | {
|
|
562
|
+
error: string;
|
|
563
|
+
};
|
|
564
|
+
interface BreakEvenInput {
|
|
565
|
+
fixedCosts: number;
|
|
566
|
+
variableCostPerUnit: number;
|
|
567
|
+
pricePerUnit: number;
|
|
568
|
+
salesVolume?: number | null;
|
|
569
|
+
}
|
|
570
|
+
interface BreakEvenResult {
|
|
571
|
+
fixedCosts: number;
|
|
572
|
+
variableCostPerUnit: number;
|
|
573
|
+
pricePerUnit: number;
|
|
574
|
+
contributionMarginPerUnit: number;
|
|
575
|
+
contributionMarginRatio: number;
|
|
576
|
+
breakEvenUnits: number;
|
|
577
|
+
breakEvenUnitsRounded: number;
|
|
578
|
+
breakEvenRevenue: number;
|
|
579
|
+
salesVolume?: number;
|
|
580
|
+
revenueAtSalesVolume?: number;
|
|
581
|
+
profitAtSalesVolume?: number;
|
|
582
|
+
marginOfSafetyUnits?: number;
|
|
583
|
+
marginOfSafetyPercent?: number;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* From fixed costs, the variable cost per unit, and the selling price per
|
|
587
|
+
* unit, compute the break-even point: the unit count and revenue at which
|
|
588
|
+
* profit is exactly zero. The price must exceed the variable cost, since
|
|
589
|
+
* otherwise every unit sold loses money and break-even is never reached no
|
|
590
|
+
* matter the volume. Optionally pass a sales volume to also get the profit
|
|
591
|
+
* (or loss) at that volume and the margin of safety above break-even. Pure
|
|
592
|
+
* arithmetic, no live cost/pricing feed.
|
|
593
|
+
*/
|
|
594
|
+
declare function calculateBreakEven(input: BreakEvenInput): BreakEvenResult | {
|
|
595
|
+
error: string;
|
|
596
|
+
};
|
|
514
597
|
|
|
515
598
|
type units_AmortizationRow = AmortizationRow;
|
|
516
599
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -522,6 +605,8 @@ declare const units_BYTE_UNITS: typeof BYTE_UNITS;
|
|
|
522
605
|
type units_BarcodeFormat = BarcodeFormat;
|
|
523
606
|
type units_BarcodeValidationResult = BarcodeValidationResult;
|
|
524
607
|
type units_BaseConvertResult = BaseConvertResult;
|
|
608
|
+
type units_BreakEvenInput = BreakEvenInput;
|
|
609
|
+
type units_BreakEvenResult = BreakEvenResult;
|
|
525
610
|
type units_ByteConvertResult = ByteConvertResult;
|
|
526
611
|
type units_ByteUnit = ByteUnit;
|
|
527
612
|
declare const units_COMMON_CURRENCIES: typeof COMMON_CURRENCIES;
|
|
@@ -536,6 +621,9 @@ type units_CardValidationResult = CardValidationResult;
|
|
|
536
621
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
537
622
|
type units_CompoundYearRow = CompoundYearRow;
|
|
538
623
|
type units_Dimensions = Dimensions;
|
|
624
|
+
type units_DiscountField = DiscountField;
|
|
625
|
+
type units_DiscountInput = DiscountInput;
|
|
626
|
+
type units_DiscountResult = DiscountResult;
|
|
539
627
|
type units_FilePermissions = FilePermissions;
|
|
540
628
|
type units_FormatOptions = FormatOptions;
|
|
541
629
|
type units_IbanValidationResult = IbanValidationResult;
|
|
@@ -555,17 +643,22 @@ type units_PxConvertResult = PxConvertResult;
|
|
|
555
643
|
type units_SemverVersion = SemverVersion;
|
|
556
644
|
type units_SimpleInterestResult = SimpleInterestResult;
|
|
557
645
|
type units_SubnetInfo = SubnetInfo;
|
|
646
|
+
type units_SuccessiveDiscountResult = SuccessiveDiscountResult;
|
|
647
|
+
type units_SuccessiveDiscountStep = SuccessiveDiscountStep;
|
|
558
648
|
type units_TaxDirection = TaxDirection;
|
|
559
649
|
type units_TaxResult = TaxResult;
|
|
560
650
|
type units_TimeValueDirection = TimeValueDirection;
|
|
561
651
|
type units_TimeValueResult = TimeValueResult;
|
|
562
652
|
type units_TipSplitResult = TipSplitResult;
|
|
563
653
|
type units_ViewportConvertResult = ViewportConvertResult;
|
|
654
|
+
declare const units_applySuccessiveDiscounts: typeof applySuccessiveDiscounts;
|
|
564
655
|
declare const units_autoFormat: typeof autoFormat;
|
|
565
656
|
declare const units_bumpVersion: typeof bumpVersion;
|
|
566
657
|
declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
567
658
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
659
|
+
declare const units_calculateBreakEven: typeof calculateBreakEven;
|
|
568
660
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
661
|
+
declare const units_calculateDiscount: typeof calculateDiscount;
|
|
569
662
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
570
663
|
declare const units_calculateMarginMarkup: typeof calculateMarginMarkup;
|
|
571
664
|
declare const units_calculatePercentageChange: typeof calculatePercentageChange;
|
|
@@ -626,7 +719,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
626
719
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
627
720
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
628
721
|
declare namespace units {
|
|
629
|
-
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_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_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_Dimensions as Dimensions, 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_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, 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, type units_ViewportConvertResult as ViewportConvertResult, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePercentageChange as calculatePercentageChange, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_compareSemver as compareSemver, 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 };
|
|
722
|
+
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_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, 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_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, 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, 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_calculateCompoundInterest as calculateCompoundInterest, units_calculateDiscount as calculateDiscount, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePercentageChange as calculatePercentageChange, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_compareSemver as compareSemver, 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 };
|
|
630
723
|
}
|
|
631
724
|
|
|
632
|
-
export {
|
|
725
|
+
export { type TimeValueDirection as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type Dimensions as D, type FormatOptions as E, type FilePermissions as F, type IpConversion as G, type IsbnFormat as H, type IbanValidationResult as I, type IsbnResult as J, type MarginMarkupInput as K, type LoanResult as L, type MarginMarkupField as M, type MarginMarkupResult as N, type NotationStyle as O, type NumberBase as P, type PercentChangeDirection as Q, type PercentageChangeResult as R, type Permission as S, type PxConvertResult as T, type SemverVersion as U, type SimpleInterestResult as V, type SubnetInfo as W, type SuccessiveDiscountResult as X, type SuccessiveDiscountStep as Y, type TaxDirection as Z, type TaxResult as _, type AprApyDirection as a, splitSubnet as a$, type TimeValueResult as a0, type TipSplitResult as a1, type ViewportConvertResult as a2, applySuccessiveDiscounts as a3, autoFormat as a4, bumpVersion as a5, calcAspectRatio as a6, calcSubnet as a7, calculateBreakEven as a8, calculateCompoundInterest as a9, ipToBinary as aA, ipToDecimal as aB, ipToDecimalCidr as aC, ipToHex as aD, ipToOctal as aE, isValid as aF, isValidCidr as aG, isValidIp as aH, isValidIpv4 as aI, marginToMarkup as aJ, markupToMargin as aK, octalToPermissions as aL, parseFileSize as aM, parseInput as aN, parseNumberString as aO, parseSemver as aP, permissionsToChmod as aQ, permissionsToOctal as aR, permissionsToSymbolic as aS, ptToPx as aT, pxToAll as aU, pxToViewport as aV, remToPx as aW, satisfiesRange as aX, scaleByHeight as aY, scaleByWidth as aZ, sortVersions as a_, calculateDiscount as aa, calculateLoan as ab, calculateMarginMarkup as ac, calculatePercentageChange as ad, calculateSimpleInterest as ae, calculateTax as af, calculateTimeValue as ag, calculateTipSplit as ah, compareSemver as ai, convert as aj, convertAprApy as ak, convertBytes as al, convertIp as am, coverBox as an, decimalToIp as ao, decimalToIpCidr as ap, describePermissions as aq, fitIntoBox as ar, formatNumber as as, formatValue as at, formatVwValue as au, formatWithSeparator as av, gcd as aw, ipFromBinary as ax, ipFromDecimal as ay, ipFromHex as az, type AprApyResult as b, symbolicToPermissions as b0, validateBarcode as b1, validateCardNumber as b2, validateIban as b3, validateIsbn as b4, viewportToPx as b5, 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 CompoundInterestResult as v, type CompoundYearRow as w, type DiscountField as x, type DiscountInput as y, type DiscountResult as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilix-tech/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.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",
|