@utilix-tech/sdk 0.55.0 → 0.56.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 +4 -0
- package/README.md +3 -2
- package/dist/{chunk-LI63MAZU.js → chunk-MRIGQRTU.js} +41 -1
- package/dist/{chunk-DEBIH7QS.js → chunk-TVSQ53TZ.js} +55 -1
- package/dist/index.cjs +94 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{network-C6IcHeMB.d.cts → network-CoGf7_Op.d.cts} +37 -2
- package/dist/{network-C6IcHeMB.d.ts → network-CoGf7_Op.d.ts} +37 -2
- package/dist/tools/network.cjs +54 -0
- package/dist/tools/network.d.cts +1 -1
- package/dist/tools/network.d.ts +1 -1
- package/dist/tools/network.js +1 -1
- package/dist/tools/units.cjs +40 -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-BM1l5LG9.d.cts → units-BM9GkUZW.d.cts} +36 -2
- package/dist/{units-BM1l5LG9.d.ts → units-BM9GkUZW.d.ts} +36 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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.56.0
|
|
6
|
+
- Add `buildAcceptLanguage`, `parseAcceptLanguage` (accept-language-parser): build an Accept-Language request-header value from locale/quality pairs sorted by descending preference, or parse an existing one into its ranked entries.
|
|
7
|
+
- Add `calculateBlendedLoanRate` (blended-loan-rate-calculator): compute the single weighted-average interest rate across a list of loan balances, plus combined monthly and annual interest accrual.
|
|
8
|
+
|
|
5
9
|
## 0.55.0
|
|
6
10
|
- Add `calculateDebtToIncomeRatio` (debt-to-income-ratio-calculator): compute the debt-to-income ratio (total monthly debt payments / gross monthly income) from one or more monthly debts, plus a qualitative tier matching common mortgage-lending guidance.
|
|
7
11
|
- Add `inferCsvColumnTypes` (csv-column-type-inferencer): parse CSV/TSV data and infer each column's data type (integer, float, boolean, ISO 8601 date, or string), flagging nullable columns and empty-cell counts.
|
package/README.md
CHANGED
|
@@ -331,7 +331,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
|
|
|
331
331
|
### `/units`: Conversions
|
|
332
332
|
|
|
333
333
|
```ts
|
|
334
|
-
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, calculateMovingAverages, calculateGpa, calculateCreditUtilization, calculateDebtToIncomeRatio } from "@utilix-tech/sdk/units";
|
|
334
|
+
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, calculateMovingAverages, calculateGpa, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateBlendedLoanRate } from "@utilix-tech/sdk/units";
|
|
335
335
|
|
|
336
336
|
// File sizes
|
|
337
337
|
convertBytes(1073741824, "GB"); // 1
|
|
@@ -487,7 +487,8 @@ import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
|
|
|
487
487
|
buildRangeHeader, parseContentRangeHeader, buildVaryHeader, parseVaryHeader, validateManifest,
|
|
488
488
|
buildPermissionsPolicy, parsePermissionsPolicy, buildClientHints, parseClientHintHeaders,
|
|
489
489
|
buildContentDisposition, parseContentDisposition,
|
|
490
|
-
buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk
|
|
490
|
+
buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk,
|
|
491
|
+
buildAcceptLanguage, parseAcceptLanguage } from "@utilix-tech/sdk/network";
|
|
491
492
|
|
|
492
493
|
getStatusCode(404);
|
|
493
494
|
// { code: 404, text: "Not Found", description: "...", category: "Client Error" }
|
|
@@ -21,6 +21,7 @@ __export(units_exports, {
|
|
|
21
21
|
bumpVersion: () => bumpVersion,
|
|
22
22
|
calcAspectRatio: () => calcAspectRatio,
|
|
23
23
|
calcSubnet: () => calcSubnet,
|
|
24
|
+
calculateBlendedLoanRate: () => calculateBlendedLoanRate,
|
|
24
25
|
calculateBreakEven: () => calculateBreakEven,
|
|
25
26
|
calculateCashBreakdown: () => calculateCashBreakdown,
|
|
26
27
|
calculateCashRounding: () => calculateCashRounding,
|
|
@@ -2271,5 +2272,44 @@ function calculateDebtToIncomeRatio(debts, grossMonthlyIncome) {
|
|
|
2271
2272
|
tier: _classifyDti(dtiPercent)
|
|
2272
2273
|
};
|
|
2273
2274
|
}
|
|
2275
|
+
function calculateBlendedLoanRate(loans) {
|
|
2276
|
+
if (!Array.isArray(loans) || loans.length === 0) {
|
|
2277
|
+
return { error: "loans must be a non-empty array" };
|
|
2278
|
+
}
|
|
2279
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2280
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
2281
|
+
let totalBalance = 0;
|
|
2282
|
+
for (let i = 0; i < loans.length; i++) {
|
|
2283
|
+
const loan = loans[i];
|
|
2284
|
+
if (typeof loan.balance !== "number" || !Number.isFinite(loan.balance) || loan.balance <= 0) {
|
|
2285
|
+
return { error: `loan ${i + 1}: balance must be a finite number greater than zero` };
|
|
2286
|
+
}
|
|
2287
|
+
if (typeof loan.ratePercent !== "number" || !Number.isFinite(loan.ratePercent) || loan.ratePercent < 0) {
|
|
2288
|
+
return { error: `loan ${i + 1}: ratePercent must be a finite, non-negative number` };
|
|
2289
|
+
}
|
|
2290
|
+
totalBalance += loan.balance;
|
|
2291
|
+
}
|
|
2292
|
+
let totalMonthlyInterest = 0;
|
|
2293
|
+
let weightedRateSum = 0;
|
|
2294
|
+
const results = loans.map((loan, i) => {
|
|
2295
|
+
const monthlyInterest = round22(loan.balance * loan.ratePercent / 100 / 12);
|
|
2296
|
+
totalMonthlyInterest += monthlyInterest;
|
|
2297
|
+
weightedRateSum += loan.balance * loan.ratePercent;
|
|
2298
|
+
return {
|
|
2299
|
+
label: loan.label?.trim() || `Loan ${i + 1}`,
|
|
2300
|
+
balance: loan.balance,
|
|
2301
|
+
ratePercent: loan.ratePercent,
|
|
2302
|
+
monthlyInterest,
|
|
2303
|
+
shareOfTotalPercent: round22(loan.balance / totalBalance * 100)
|
|
2304
|
+
};
|
|
2305
|
+
});
|
|
2306
|
+
return {
|
|
2307
|
+
loans: results,
|
|
2308
|
+
totalBalance: round22(totalBalance),
|
|
2309
|
+
weightedAverageRatePercent: round4(weightedRateSum / totalBalance),
|
|
2310
|
+
totalMonthlyInterest: round22(totalMonthlyInterest),
|
|
2311
|
+
totalAnnualInterest: round22(totalMonthlyInterest * 12)
|
|
2312
|
+
};
|
|
2313
|
+
}
|
|
2274
2314
|
|
|
2275
|
-
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, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, 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 };
|
|
2315
|
+
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, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, 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 };
|
|
@@ -13,6 +13,7 @@ __export(network_exports, {
|
|
|
13
13
|
X_CONTENT_TYPE_OPTIONS_HEADER: () => X_CONTENT_TYPE_OPTIONS_HEADER,
|
|
14
14
|
analyzeEmailHeaders: () => analyzeEmailHeaders,
|
|
15
15
|
assessContentTypeRisk: () => assessContentTypeRisk,
|
|
16
|
+
buildAcceptLanguage: () => buildAcceptLanguage,
|
|
16
17
|
buildCacheControl: () => buildCacheControl,
|
|
17
18
|
buildClientHints: () => buildClientHints,
|
|
18
19
|
buildContentDisposition: () => buildContentDisposition,
|
|
@@ -40,6 +41,7 @@ __export(network_exports, {
|
|
|
40
41
|
isValidIp: () => isValidIp,
|
|
41
42
|
isValidIpv4: () => isValidIpv4,
|
|
42
43
|
isValidIpv6: () => isValidIpv6,
|
|
44
|
+
parseAcceptLanguage: () => parseAcceptLanguage,
|
|
43
45
|
parseClientHintHeaders: () => parseClientHintHeaders,
|
|
44
46
|
parseContentDisposition: () => parseContentDisposition,
|
|
45
47
|
parseContentRangeHeader: () => parseContentRangeHeader,
|
|
@@ -2832,5 +2834,57 @@ function assessContentTypeRisk(contentType) {
|
|
|
2832
2834
|
reason: "Not a well-known type in this tool's lookup table. Treat any response type as sniffable unless you've confirmed the serving browser trusts it, and set nosniff regardless of type as a baseline defense."
|
|
2833
2835
|
};
|
|
2834
2836
|
}
|
|
2837
|
+
function formatAcceptLanguageQuality(q) {
|
|
2838
|
+
let s = q.toFixed(3);
|
|
2839
|
+
s = s.replace(/0+$/, "");
|
|
2840
|
+
s = s.replace(/\.$/, "");
|
|
2841
|
+
return s;
|
|
2842
|
+
}
|
|
2843
|
+
function formatAcceptLanguageEntries(entries) {
|
|
2844
|
+
return entries.map((e) => e.quality === 1 ? e.locale : `${e.locale};q=${formatAcceptLanguageQuality(e.quality)}`).join(", ");
|
|
2845
|
+
}
|
|
2846
|
+
function sortAcceptLanguageEntries(entries) {
|
|
2847
|
+
return entries.map((e, i) => ({ e, i })).sort((a, b) => b.e.quality - a.e.quality || a.i - b.i).map((x) => x.e);
|
|
2848
|
+
}
|
|
2849
|
+
function buildAcceptLanguage(locales) {
|
|
2850
|
+
if (!Array.isArray(locales) || locales.length === 0) return { error: "At least one locale is required" };
|
|
2851
|
+
const entries = [];
|
|
2852
|
+
for (let i = 0; i < locales.length; i++) {
|
|
2853
|
+
const { locale, quality } = locales[i];
|
|
2854
|
+
if (typeof locale !== "string" || locale.trim() === "") return { error: `locale ${i + 1}: locale is required` };
|
|
2855
|
+
const q = quality === void 0 ? 1 : quality;
|
|
2856
|
+
if (typeof q !== "number" || !Number.isFinite(q) || q < 0 || q > 1) {
|
|
2857
|
+
return { error: `locale ${i + 1}: quality must be between 0 and 1` };
|
|
2858
|
+
}
|
|
2859
|
+
entries.push({ locale: locale.trim(), quality: Math.round(q * 1e3) / 1e3 });
|
|
2860
|
+
}
|
|
2861
|
+
const sorted = sortAcceptLanguageEntries(entries);
|
|
2862
|
+
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
2863
|
+
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
2864
|
+
}
|
|
2865
|
+
function parseAcceptLanguage(raw) {
|
|
2866
|
+
if (!raw || raw.trim() === "") return { error: "Input is empty" };
|
|
2867
|
+
const withoutLabel = raw.trim().replace(/^accept-language:\s*/i, "");
|
|
2868
|
+
const parts = withoutLabel.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
|
|
2869
|
+
if (parts.length === 0) return { error: "Input is empty" };
|
|
2870
|
+
const entries = [];
|
|
2871
|
+
for (const part of parts) {
|
|
2872
|
+
const [localeRaw, ...paramsRaw] = part.split(";").map((s) => s.trim());
|
|
2873
|
+
if (!localeRaw) return { error: `Invalid entry: "${part}"` };
|
|
2874
|
+
let quality = 1;
|
|
2875
|
+
for (const param of paramsRaw) {
|
|
2876
|
+
const m = /^q=([\d.]+)$/i.exec(param);
|
|
2877
|
+
if (!m) return { error: `Invalid parameter in "${part}"` };
|
|
2878
|
+
quality = Number(m[1]);
|
|
2879
|
+
if (!Number.isFinite(quality) || quality < 0 || quality > 1) {
|
|
2880
|
+
return { error: `q value must be between 0 and 1 in "${part}"` };
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
entries.push({ locale: localeRaw, quality: Math.round(quality * 1e3) / 1e3 });
|
|
2884
|
+
}
|
|
2885
|
+
const sorted = sortAcceptLanguageEntries(entries);
|
|
2886
|
+
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
2887
|
+
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
2888
|
+
}
|
|
2835
2889
|
|
|
2836
|
-
export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, X_CONTENT_TYPE_OPTIONS_HEADER, analyzeEmailHeaders, assessContentTypeRisk, buildCacheControl, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
|
|
2890
|
+
export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, X_CONTENT_TYPE_OPTIONS_HEADER, analyzeEmailHeaders, assessContentTypeRisk, buildAcceptLanguage, buildCacheControl, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseAcceptLanguage, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
|
package/dist/index.cjs
CHANGED
|
@@ -8338,6 +8338,7 @@ __export(units_exports, {
|
|
|
8338
8338
|
bumpVersion: () => bumpVersion,
|
|
8339
8339
|
calcAspectRatio: () => calcAspectRatio,
|
|
8340
8340
|
calcSubnet: () => calcSubnet,
|
|
8341
|
+
calculateBlendedLoanRate: () => calculateBlendedLoanRate,
|
|
8341
8342
|
calculateBreakEven: () => calculateBreakEven,
|
|
8342
8343
|
calculateCashBreakdown: () => calculateCashBreakdown,
|
|
8343
8344
|
calculateCashRounding: () => calculateCashRounding,
|
|
@@ -10588,6 +10589,45 @@ function calculateDebtToIncomeRatio(debts, grossMonthlyIncome) {
|
|
|
10588
10589
|
tier: _classifyDti(dtiPercent)
|
|
10589
10590
|
};
|
|
10590
10591
|
}
|
|
10592
|
+
function calculateBlendedLoanRate(loans) {
|
|
10593
|
+
if (!Array.isArray(loans) || loans.length === 0) {
|
|
10594
|
+
return { error: "loans must be a non-empty array" };
|
|
10595
|
+
}
|
|
10596
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10597
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
10598
|
+
let totalBalance = 0;
|
|
10599
|
+
for (let i = 0; i < loans.length; i++) {
|
|
10600
|
+
const loan = loans[i];
|
|
10601
|
+
if (typeof loan.balance !== "number" || !Number.isFinite(loan.balance) || loan.balance <= 0) {
|
|
10602
|
+
return { error: `loan ${i + 1}: balance must be a finite number greater than zero` };
|
|
10603
|
+
}
|
|
10604
|
+
if (typeof loan.ratePercent !== "number" || !Number.isFinite(loan.ratePercent) || loan.ratePercent < 0) {
|
|
10605
|
+
return { error: `loan ${i + 1}: ratePercent must be a finite, non-negative number` };
|
|
10606
|
+
}
|
|
10607
|
+
totalBalance += loan.balance;
|
|
10608
|
+
}
|
|
10609
|
+
let totalMonthlyInterest = 0;
|
|
10610
|
+
let weightedRateSum = 0;
|
|
10611
|
+
const results = loans.map((loan, i) => {
|
|
10612
|
+
const monthlyInterest = round23(loan.balance * loan.ratePercent / 100 / 12);
|
|
10613
|
+
totalMonthlyInterest += monthlyInterest;
|
|
10614
|
+
weightedRateSum += loan.balance * loan.ratePercent;
|
|
10615
|
+
return {
|
|
10616
|
+
label: loan.label?.trim() || `Loan ${i + 1}`,
|
|
10617
|
+
balance: loan.balance,
|
|
10618
|
+
ratePercent: loan.ratePercent,
|
|
10619
|
+
monthlyInterest,
|
|
10620
|
+
shareOfTotalPercent: round23(loan.balance / totalBalance * 100)
|
|
10621
|
+
};
|
|
10622
|
+
});
|
|
10623
|
+
return {
|
|
10624
|
+
loans: results,
|
|
10625
|
+
totalBalance: round23(totalBalance),
|
|
10626
|
+
weightedAverageRatePercent: round4(weightedRateSum / totalBalance),
|
|
10627
|
+
totalMonthlyInterest: round23(totalMonthlyInterest),
|
|
10628
|
+
totalAnnualInterest: round23(totalMonthlyInterest * 12)
|
|
10629
|
+
};
|
|
10630
|
+
}
|
|
10591
10631
|
|
|
10592
10632
|
// src/tools/network.ts
|
|
10593
10633
|
var network_exports = {};
|
|
@@ -10602,6 +10642,7 @@ __export(network_exports, {
|
|
|
10602
10642
|
X_CONTENT_TYPE_OPTIONS_HEADER: () => X_CONTENT_TYPE_OPTIONS_HEADER,
|
|
10603
10643
|
analyzeEmailHeaders: () => analyzeEmailHeaders,
|
|
10604
10644
|
assessContentTypeRisk: () => assessContentTypeRisk,
|
|
10645
|
+
buildAcceptLanguage: () => buildAcceptLanguage,
|
|
10605
10646
|
buildCacheControl: () => buildCacheControl,
|
|
10606
10647
|
buildClientHints: () => buildClientHints,
|
|
10607
10648
|
buildContentDisposition: () => buildContentDisposition,
|
|
@@ -10629,6 +10670,7 @@ __export(network_exports, {
|
|
|
10629
10670
|
isValidIp: () => isValidIp2,
|
|
10630
10671
|
isValidIpv4: () => isValidIpv42,
|
|
10631
10672
|
isValidIpv6: () => isValidIpv6,
|
|
10673
|
+
parseAcceptLanguage: () => parseAcceptLanguage,
|
|
10632
10674
|
parseClientHintHeaders: () => parseClientHintHeaders,
|
|
10633
10675
|
parseContentDisposition: () => parseContentDisposition,
|
|
10634
10676
|
parseContentRangeHeader: () => parseContentRangeHeader,
|
|
@@ -13421,6 +13463,58 @@ function assessContentTypeRisk(contentType) {
|
|
|
13421
13463
|
reason: "Not a well-known type in this tool's lookup table. Treat any response type as sniffable unless you've confirmed the serving browser trusts it, and set nosniff regardless of type as a baseline defense."
|
|
13422
13464
|
};
|
|
13423
13465
|
}
|
|
13466
|
+
function formatAcceptLanguageQuality(q) {
|
|
13467
|
+
let s = q.toFixed(3);
|
|
13468
|
+
s = s.replace(/0+$/, "");
|
|
13469
|
+
s = s.replace(/\.$/, "");
|
|
13470
|
+
return s;
|
|
13471
|
+
}
|
|
13472
|
+
function formatAcceptLanguageEntries(entries) {
|
|
13473
|
+
return entries.map((e) => e.quality === 1 ? e.locale : `${e.locale};q=${formatAcceptLanguageQuality(e.quality)}`).join(", ");
|
|
13474
|
+
}
|
|
13475
|
+
function sortAcceptLanguageEntries(entries) {
|
|
13476
|
+
return entries.map((e, i) => ({ e, i })).sort((a, b) => b.e.quality - a.e.quality || a.i - b.i).map((x) => x.e);
|
|
13477
|
+
}
|
|
13478
|
+
function buildAcceptLanguage(locales) {
|
|
13479
|
+
if (!Array.isArray(locales) || locales.length === 0) return { error: "At least one locale is required" };
|
|
13480
|
+
const entries = [];
|
|
13481
|
+
for (let i = 0; i < locales.length; i++) {
|
|
13482
|
+
const { locale, quality } = locales[i];
|
|
13483
|
+
if (typeof locale !== "string" || locale.trim() === "") return { error: `locale ${i + 1}: locale is required` };
|
|
13484
|
+
const q = quality === void 0 ? 1 : quality;
|
|
13485
|
+
if (typeof q !== "number" || !Number.isFinite(q) || q < 0 || q > 1) {
|
|
13486
|
+
return { error: `locale ${i + 1}: quality must be between 0 and 1` };
|
|
13487
|
+
}
|
|
13488
|
+
entries.push({ locale: locale.trim(), quality: Math.round(q * 1e3) / 1e3 });
|
|
13489
|
+
}
|
|
13490
|
+
const sorted = sortAcceptLanguageEntries(entries);
|
|
13491
|
+
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
13492
|
+
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
13493
|
+
}
|
|
13494
|
+
function parseAcceptLanguage(raw) {
|
|
13495
|
+
if (!raw || raw.trim() === "") return { error: "Input is empty" };
|
|
13496
|
+
const withoutLabel = raw.trim().replace(/^accept-language:\s*/i, "");
|
|
13497
|
+
const parts = withoutLabel.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
|
|
13498
|
+
if (parts.length === 0) return { error: "Input is empty" };
|
|
13499
|
+
const entries = [];
|
|
13500
|
+
for (const part of parts) {
|
|
13501
|
+
const [localeRaw, ...paramsRaw] = part.split(";").map((s) => s.trim());
|
|
13502
|
+
if (!localeRaw) return { error: `Invalid entry: "${part}"` };
|
|
13503
|
+
let quality = 1;
|
|
13504
|
+
for (const param of paramsRaw) {
|
|
13505
|
+
const m = /^q=([\d.]+)$/i.exec(param);
|
|
13506
|
+
if (!m) return { error: `Invalid parameter in "${part}"` };
|
|
13507
|
+
quality = Number(m[1]);
|
|
13508
|
+
if (!Number.isFinite(quality) || quality < 0 || quality > 1) {
|
|
13509
|
+
return { error: `q value must be between 0 and 1 in "${part}"` };
|
|
13510
|
+
}
|
|
13511
|
+
}
|
|
13512
|
+
entries.push({ locale: localeRaw, quality: Math.round(quality * 1e3) / 1e3 });
|
|
13513
|
+
}
|
|
13514
|
+
const sorted = sortAcceptLanguageEntries(entries);
|
|
13515
|
+
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
13516
|
+
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
13517
|
+
}
|
|
13424
13518
|
|
|
13425
13519
|
// src/tools/api.ts
|
|
13426
13520
|
var api_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -5,8 +5,8 @@ export { t as text } from './text-DWUcY8H1.cjs';
|
|
|
5
5
|
export { d as data } from './data-Cvyg8ZXo.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-
|
|
9
|
-
export { n as network } from './network-
|
|
8
|
+
export { u as units } from './units-BM9GkUZW.cjs';
|
|
9
|
+
export { n as network } from './network-CoGf7_Op.cjs';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.cjs';
|
|
11
11
|
export { c as code } from './code-rxidGgvB.cjs';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { t as text } from './text-DWUcY8H1.js';
|
|
|
5
5
|
export { d as data } from './data-Cvyg8ZXo.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-
|
|
9
|
-
export { n as network } from './network-
|
|
8
|
+
export { u as units } from './units-BM9GkUZW.js';
|
|
9
|
+
export { n as network } from './network-CoGf7_Op.js';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.js';
|
|
11
11
|
export { c as code } from './code-rxidGgvB.js';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { media_exports as media } from './chunk-226EH3ZI.js';
|
|
2
|
-
export { units_exports as units } from './chunk-
|
|
3
|
-
export { network_exports as network } from './chunk-
|
|
2
|
+
export { units_exports as units } from './chunk-MRIGQRTU.js';
|
|
3
|
+
export { network_exports as network } from './chunk-TVSQ53TZ.js';
|
|
4
4
|
export { api_exports as api } from './chunk-52ZDKSIX.js';
|
|
5
5
|
export { code_exports as code } from './chunk-JW4NG2GN.js';
|
|
6
6
|
export { color_exports as color } from './chunk-BPVAB4P2.js';
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* - vary-header-builder: buildVaryHeader, parseVaryHeader
|
|
23
23
|
* - permissions-policy-builder: buildPermissionsPolicy, parsePermissionsPolicy
|
|
24
24
|
* - x-content-type-options-builder: buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk
|
|
25
|
+
* - accept-language-parser: parseAcceptLanguage, buildAcceptLanguage
|
|
25
26
|
*/
|
|
26
27
|
declare const DNS_RECORD_TYPES: readonly ["A", "AAAA", "CNAME", "MX", "TXT", "NS", "SOA", "PTR", "SRV", "CAA"];
|
|
27
28
|
type DnsRecordType = typeof DNS_RECORD_TYPES[number];
|
|
@@ -743,7 +744,39 @@ interface ContentTypeRiskResult {
|
|
|
743
744
|
declare function assessContentTypeRisk(contentType: string): ContentTypeRiskResult | {
|
|
744
745
|
error: string;
|
|
745
746
|
};
|
|
747
|
+
interface AcceptLanguageEntry {
|
|
748
|
+
locale: string;
|
|
749
|
+
quality: number;
|
|
750
|
+
}
|
|
751
|
+
interface AcceptLanguageResult {
|
|
752
|
+
header: string;
|
|
753
|
+
headerValue: string;
|
|
754
|
+
entries: AcceptLanguageEntry[];
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Build an `Accept-Language` request-header value from a list of locale/
|
|
758
|
+
* quality pairs, sorting by descending quality (ties keep their original
|
|
759
|
+
* order) and omitting `;q=1` for the default weight, per RFC 9110 section
|
|
760
|
+
* 12.5.4.
|
|
761
|
+
*/
|
|
762
|
+
declare function buildAcceptLanguage(locales: {
|
|
763
|
+
locale: string;
|
|
764
|
+
quality?: number;
|
|
765
|
+
}[]): AcceptLanguageResult | {
|
|
766
|
+
error: string;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* Parse an existing `Accept-Language` header value (with or without a
|
|
770
|
+
* leading `Accept-Language:` label) into its ranked locale/quality pairs,
|
|
771
|
+
* sorted by descending quality per RFC 9110 section 12.5.4 (a missing
|
|
772
|
+
* `;q=` defaults to 1).
|
|
773
|
+
*/
|
|
774
|
+
declare function parseAcceptLanguage(raw: string): AcceptLanguageResult | {
|
|
775
|
+
error: string;
|
|
776
|
+
};
|
|
746
777
|
|
|
778
|
+
type network_AcceptLanguageEntry = AcceptLanguageEntry;
|
|
779
|
+
type network_AcceptLanguageResult = AcceptLanguageResult;
|
|
747
780
|
type network_AuthResultEntry = AuthResultEntry;
|
|
748
781
|
type network_BuildRangeHeaderOptions = BuildRangeHeaderOptions;
|
|
749
782
|
declare const network_CLIENT_HINTS: typeof CLIENT_HINTS;
|
|
@@ -823,6 +856,7 @@ type network_XContentTypeOptionsParseResult = XContentTypeOptionsParseResult;
|
|
|
823
856
|
declare const network_X_CONTENT_TYPE_OPTIONS_HEADER: typeof X_CONTENT_TYPE_OPTIONS_HEADER;
|
|
824
857
|
declare const network_analyzeEmailHeaders: typeof analyzeEmailHeaders;
|
|
825
858
|
declare const network_assessContentTypeRisk: typeof assessContentTypeRisk;
|
|
859
|
+
declare const network_buildAcceptLanguage: typeof buildAcceptLanguage;
|
|
826
860
|
declare const network_buildCacheControl: typeof buildCacheControl;
|
|
827
861
|
declare const network_buildClientHints: typeof buildClientHints;
|
|
828
862
|
declare const network_buildContentDisposition: typeof buildContentDisposition;
|
|
@@ -850,6 +884,7 @@ declare const network_isSuccess: typeof isSuccess;
|
|
|
850
884
|
declare const network_isValidIp: typeof isValidIp;
|
|
851
885
|
declare const network_isValidIpv4: typeof isValidIpv4;
|
|
852
886
|
declare const network_isValidIpv6: typeof isValidIpv6;
|
|
887
|
+
declare const network_parseAcceptLanguage: typeof parseAcceptLanguage;
|
|
853
888
|
declare const network_parseClientHintHeaders: typeof parseClientHintHeaders;
|
|
854
889
|
declare const network_parseContentDisposition: typeof parseContentDisposition;
|
|
855
890
|
declare const network_parseContentRangeHeader: typeof parseContentRangeHeader;
|
|
@@ -873,7 +908,7 @@ declare const network_validateManifest: typeof validateManifest;
|
|
|
873
908
|
declare const network_validateRobotsTxt: typeof validateRobotsTxt;
|
|
874
909
|
declare const network_validateSitemap: typeof validateSitemap;
|
|
875
910
|
declare namespace network {
|
|
876
|
-
export { type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentDispositionBuildOptions as ContentDispositionBuildOptions, type network_ContentDispositionBuildResult as ContentDispositionBuildResult, type network_ContentDispositionParseResult as ContentDispositionParseResult, type network_ContentRangeResult as ContentRangeResult, type network_ContentTypeRiskResult as ContentTypeRiskResult, type network_ContentTypeSniffRisk as ContentTypeSniffRisk, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapSplitFile as SitemapSplitFile, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_SplitSitemapOptions as SplitSitemapOptions, type network_SplitSitemapResult as SplitSitemapResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, type network_XContentTypeOptionsHeader as XContentTypeOptionsHeader, type network_XContentTypeOptionsParseResult as XContentTypeOptionsParseResult, network_X_CONTENT_TYPE_OPTIONS_HEADER as X_CONTENT_TYPE_OPTIONS_HEADER, network_analyzeEmailHeaders as analyzeEmailHeaders, network_assessContentTypeRisk as assessContentTypeRisk, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildContentDisposition as buildContentDisposition, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_buildXContentTypeOptionsHeader as buildXContentTypeOptionsHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentDisposition as parseContentDisposition, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_parseXContentTypeOptionsHeader as parseXContentTypeOptionsHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_splitSitemap as splitSitemap, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
|
|
911
|
+
export { type network_AcceptLanguageEntry as AcceptLanguageEntry, type network_AcceptLanguageResult as AcceptLanguageResult, type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentDispositionBuildOptions as ContentDispositionBuildOptions, type network_ContentDispositionBuildResult as ContentDispositionBuildResult, type network_ContentDispositionParseResult as ContentDispositionParseResult, type network_ContentRangeResult as ContentRangeResult, type network_ContentTypeRiskResult as ContentTypeRiskResult, type network_ContentTypeSniffRisk as ContentTypeSniffRisk, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapSplitFile as SitemapSplitFile, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_SplitSitemapOptions as SplitSitemapOptions, type network_SplitSitemapResult as SplitSitemapResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, type network_XContentTypeOptionsHeader as XContentTypeOptionsHeader, type network_XContentTypeOptionsParseResult as XContentTypeOptionsParseResult, network_X_CONTENT_TYPE_OPTIONS_HEADER as X_CONTENT_TYPE_OPTIONS_HEADER, network_analyzeEmailHeaders as analyzeEmailHeaders, network_assessContentTypeRisk as assessContentTypeRisk, network_buildAcceptLanguage as buildAcceptLanguage, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildContentDisposition as buildContentDisposition, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_buildXContentTypeOptionsHeader as buildXContentTypeOptionsHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseAcceptLanguage as parseAcceptLanguage, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentDisposition as parseContentDisposition, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_parseXContentTypeOptionsHeader as parseXContentTypeOptionsHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_splitSitemap as splitSitemap, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
|
|
877
912
|
}
|
|
878
913
|
|
|
879
|
-
export { type
|
|
914
|
+
export { type RangeEntryInput as $, type AcceptLanguageEntry as A, type BuildRangeHeaderOptions as B, CLIENT_HINTS as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type HttpHeader as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type Ipv6ParseResult as J, type LinkHeaderEntry as K, LINK_REL_VALUES as L, type LinkHeaderEntryInput as M, type LinkHeaderResult as N, type LinkRel as O, type ManifestIconInfo as P, type ManifestIssue as Q, type ManifestValidationResult as R, PERMISSIONS_POLICY_FEATURES as S, type ParsedClientHint as T, type ParsedDnsResult as U, type ParsedGeoResult as V, type PermissionsPolicyDirective as W, type PermissionsPolicyFeatureInput as X, type PermissionsPolicyResult as Y, REFERRER_POLICY_VALUES as Z, type RangeEntry as _, type AcceptLanguageResult as a, parseIpv6Address as a$, type RangeHeaderResult as a0, type ReceivedHop as a1, type ReferrerPolicyEntry as a2, type ReferrerPolicyResult as a3, type ReferrerPolicyValue as a4, type RobotsGroup as a5, type RobotsIssue as a6, type RobotsRule as a7, type RobotsValidationResult as a8, STATUS_CODES as a9, buildPermissionsPolicy as aA, buildRangeHeader as aB, buildReferrerPolicy as aC, buildVaryHeader as aD, buildXContentTypeOptionsHeader as aE, checkSetCookieHeader as aF, countryCodeToFlag as aG, formatCoordinates as aH, formatTtl as aI, getByCategory as aJ, getHeader as aK, getHeadersByCategory as aL, getStatusByCategory as aM, getStatusCode as aN, isClientError as aO, isServerError as aP, isSuccess as aQ, isValidIp as aR, isValidIpv4 as aS, isValidIpv6 as aT, parseAcceptLanguage as aU, parseClientHintHeaders as aV, parseContentDisposition as aW, parseContentRangeHeader as aX, parseDnsResponse as aY, parseGeoResponse as aZ, parseHar as a_, type SameSiteValue as aa, type SitemapIndexEntry as ab, type SitemapIssue as ac, type SitemapSplitFile as ad, type SitemapUrlEntry as ae, type SitemapValidationResult as af, type SplitSitemapOptions as ag, type SplitSitemapResult as ah, type StatusCode as ai, type UaDeviceType as aj, type UserAgentInfo as ak, type VaryHeaderEntry as al, type VaryHeaderResult as am, type XContentTypeOptionsHeader as an, type XContentTypeOptionsParseResult as ao, X_CONTENT_TYPE_OPTIONS_HEADER as ap, analyzeEmailHeaders as aq, assessContentTypeRisk as ar, buildAcceptLanguage as as, buildCacheControl as at, buildClientHints as au, buildContentDisposition as av, buildDnsQueryUrl as aw, buildGeoUrl as ax, buildLinkHeader as ay, buildMapUrl as az, type AuthResultEntry as b, parsePermissionsPolicy as b0, parseUserAgent as b1, parseVaryHeader as b2, parseXContentTypeOptionsHeader as b3, searchHeaders as b4, searchStatusCodes as b5, splitSitemap as b6, statusCodeToText as b7, typeNumberToLabel as b8, validateDomain as b9, validateHeaderName as ba, validateHeaderValue as bb, validateManifest as bc, validateRobotsTxt as bd, validateSitemap as be, type CacheControlDirective as c, type CacheControlOptions as d, type CacheControlResult as e, type ClientHintDef as f, type ClientHintValueType as g, type ClientHintsBuildResult as h, type ClientHintsParseResult as i, type ContentDispositionBuildOptions as j, type ContentDispositionBuildResult as k, type ContentDispositionParseResult as l, type ContentRangeResult as m, network as n, type ContentTypeRiskResult as o, type ContentTypeSniffRisk as p, type CookieAttributes as q, type CookieCheckResult as r, type DnsRecord as s, type DnsRecordType as t, type DnsResponse as u, type EmailHeaderField as v, type HarEntry as w, type HarParseResult as x, type HarSummary as y, type HeaderCategory as z };
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* - vary-header-builder: buildVaryHeader, parseVaryHeader
|
|
23
23
|
* - permissions-policy-builder: buildPermissionsPolicy, parsePermissionsPolicy
|
|
24
24
|
* - x-content-type-options-builder: buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk
|
|
25
|
+
* - accept-language-parser: parseAcceptLanguage, buildAcceptLanguage
|
|
25
26
|
*/
|
|
26
27
|
declare const DNS_RECORD_TYPES: readonly ["A", "AAAA", "CNAME", "MX", "TXT", "NS", "SOA", "PTR", "SRV", "CAA"];
|
|
27
28
|
type DnsRecordType = typeof DNS_RECORD_TYPES[number];
|
|
@@ -743,7 +744,39 @@ interface ContentTypeRiskResult {
|
|
|
743
744
|
declare function assessContentTypeRisk(contentType: string): ContentTypeRiskResult | {
|
|
744
745
|
error: string;
|
|
745
746
|
};
|
|
747
|
+
interface AcceptLanguageEntry {
|
|
748
|
+
locale: string;
|
|
749
|
+
quality: number;
|
|
750
|
+
}
|
|
751
|
+
interface AcceptLanguageResult {
|
|
752
|
+
header: string;
|
|
753
|
+
headerValue: string;
|
|
754
|
+
entries: AcceptLanguageEntry[];
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Build an `Accept-Language` request-header value from a list of locale/
|
|
758
|
+
* quality pairs, sorting by descending quality (ties keep their original
|
|
759
|
+
* order) and omitting `;q=1` for the default weight, per RFC 9110 section
|
|
760
|
+
* 12.5.4.
|
|
761
|
+
*/
|
|
762
|
+
declare function buildAcceptLanguage(locales: {
|
|
763
|
+
locale: string;
|
|
764
|
+
quality?: number;
|
|
765
|
+
}[]): AcceptLanguageResult | {
|
|
766
|
+
error: string;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* Parse an existing `Accept-Language` header value (with or without a
|
|
770
|
+
* leading `Accept-Language:` label) into its ranked locale/quality pairs,
|
|
771
|
+
* sorted by descending quality per RFC 9110 section 12.5.4 (a missing
|
|
772
|
+
* `;q=` defaults to 1).
|
|
773
|
+
*/
|
|
774
|
+
declare function parseAcceptLanguage(raw: string): AcceptLanguageResult | {
|
|
775
|
+
error: string;
|
|
776
|
+
};
|
|
746
777
|
|
|
778
|
+
type network_AcceptLanguageEntry = AcceptLanguageEntry;
|
|
779
|
+
type network_AcceptLanguageResult = AcceptLanguageResult;
|
|
747
780
|
type network_AuthResultEntry = AuthResultEntry;
|
|
748
781
|
type network_BuildRangeHeaderOptions = BuildRangeHeaderOptions;
|
|
749
782
|
declare const network_CLIENT_HINTS: typeof CLIENT_HINTS;
|
|
@@ -823,6 +856,7 @@ type network_XContentTypeOptionsParseResult = XContentTypeOptionsParseResult;
|
|
|
823
856
|
declare const network_X_CONTENT_TYPE_OPTIONS_HEADER: typeof X_CONTENT_TYPE_OPTIONS_HEADER;
|
|
824
857
|
declare const network_analyzeEmailHeaders: typeof analyzeEmailHeaders;
|
|
825
858
|
declare const network_assessContentTypeRisk: typeof assessContentTypeRisk;
|
|
859
|
+
declare const network_buildAcceptLanguage: typeof buildAcceptLanguage;
|
|
826
860
|
declare const network_buildCacheControl: typeof buildCacheControl;
|
|
827
861
|
declare const network_buildClientHints: typeof buildClientHints;
|
|
828
862
|
declare const network_buildContentDisposition: typeof buildContentDisposition;
|
|
@@ -850,6 +884,7 @@ declare const network_isSuccess: typeof isSuccess;
|
|
|
850
884
|
declare const network_isValidIp: typeof isValidIp;
|
|
851
885
|
declare const network_isValidIpv4: typeof isValidIpv4;
|
|
852
886
|
declare const network_isValidIpv6: typeof isValidIpv6;
|
|
887
|
+
declare const network_parseAcceptLanguage: typeof parseAcceptLanguage;
|
|
853
888
|
declare const network_parseClientHintHeaders: typeof parseClientHintHeaders;
|
|
854
889
|
declare const network_parseContentDisposition: typeof parseContentDisposition;
|
|
855
890
|
declare const network_parseContentRangeHeader: typeof parseContentRangeHeader;
|
|
@@ -873,7 +908,7 @@ declare const network_validateManifest: typeof validateManifest;
|
|
|
873
908
|
declare const network_validateRobotsTxt: typeof validateRobotsTxt;
|
|
874
909
|
declare const network_validateSitemap: typeof validateSitemap;
|
|
875
910
|
declare namespace network {
|
|
876
|
-
export { type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentDispositionBuildOptions as ContentDispositionBuildOptions, type network_ContentDispositionBuildResult as ContentDispositionBuildResult, type network_ContentDispositionParseResult as ContentDispositionParseResult, type network_ContentRangeResult as ContentRangeResult, type network_ContentTypeRiskResult as ContentTypeRiskResult, type network_ContentTypeSniffRisk as ContentTypeSniffRisk, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapSplitFile as SitemapSplitFile, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_SplitSitemapOptions as SplitSitemapOptions, type network_SplitSitemapResult as SplitSitemapResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, type network_XContentTypeOptionsHeader as XContentTypeOptionsHeader, type network_XContentTypeOptionsParseResult as XContentTypeOptionsParseResult, network_X_CONTENT_TYPE_OPTIONS_HEADER as X_CONTENT_TYPE_OPTIONS_HEADER, network_analyzeEmailHeaders as analyzeEmailHeaders, network_assessContentTypeRisk as assessContentTypeRisk, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildContentDisposition as buildContentDisposition, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_buildXContentTypeOptionsHeader as buildXContentTypeOptionsHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentDisposition as parseContentDisposition, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_parseXContentTypeOptionsHeader as parseXContentTypeOptionsHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_splitSitemap as splitSitemap, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
|
|
911
|
+
export { type network_AcceptLanguageEntry as AcceptLanguageEntry, type network_AcceptLanguageResult as AcceptLanguageResult, type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentDispositionBuildOptions as ContentDispositionBuildOptions, type network_ContentDispositionBuildResult as ContentDispositionBuildResult, type network_ContentDispositionParseResult as ContentDispositionParseResult, type network_ContentRangeResult as ContentRangeResult, type network_ContentTypeRiskResult as ContentTypeRiskResult, type network_ContentTypeSniffRisk as ContentTypeSniffRisk, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapSplitFile as SitemapSplitFile, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_SplitSitemapOptions as SplitSitemapOptions, type network_SplitSitemapResult as SplitSitemapResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, type network_XContentTypeOptionsHeader as XContentTypeOptionsHeader, type network_XContentTypeOptionsParseResult as XContentTypeOptionsParseResult, network_X_CONTENT_TYPE_OPTIONS_HEADER as X_CONTENT_TYPE_OPTIONS_HEADER, network_analyzeEmailHeaders as analyzeEmailHeaders, network_assessContentTypeRisk as assessContentTypeRisk, network_buildAcceptLanguage as buildAcceptLanguage, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildContentDisposition as buildContentDisposition, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_buildXContentTypeOptionsHeader as buildXContentTypeOptionsHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseAcceptLanguage as parseAcceptLanguage, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentDisposition as parseContentDisposition, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_parseXContentTypeOptionsHeader as parseXContentTypeOptionsHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_splitSitemap as splitSitemap, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
|
|
877
912
|
}
|
|
878
913
|
|
|
879
|
-
export { type
|
|
914
|
+
export { type RangeEntryInput as $, type AcceptLanguageEntry as A, type BuildRangeHeaderOptions as B, CLIENT_HINTS as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type HttpHeader as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type Ipv6ParseResult as J, type LinkHeaderEntry as K, LINK_REL_VALUES as L, type LinkHeaderEntryInput as M, type LinkHeaderResult as N, type LinkRel as O, type ManifestIconInfo as P, type ManifestIssue as Q, type ManifestValidationResult as R, PERMISSIONS_POLICY_FEATURES as S, type ParsedClientHint as T, type ParsedDnsResult as U, type ParsedGeoResult as V, type PermissionsPolicyDirective as W, type PermissionsPolicyFeatureInput as X, type PermissionsPolicyResult as Y, REFERRER_POLICY_VALUES as Z, type RangeEntry as _, type AcceptLanguageResult as a, parseIpv6Address as a$, type RangeHeaderResult as a0, type ReceivedHop as a1, type ReferrerPolicyEntry as a2, type ReferrerPolicyResult as a3, type ReferrerPolicyValue as a4, type RobotsGroup as a5, type RobotsIssue as a6, type RobotsRule as a7, type RobotsValidationResult as a8, STATUS_CODES as a9, buildPermissionsPolicy as aA, buildRangeHeader as aB, buildReferrerPolicy as aC, buildVaryHeader as aD, buildXContentTypeOptionsHeader as aE, checkSetCookieHeader as aF, countryCodeToFlag as aG, formatCoordinates as aH, formatTtl as aI, getByCategory as aJ, getHeader as aK, getHeadersByCategory as aL, getStatusByCategory as aM, getStatusCode as aN, isClientError as aO, isServerError as aP, isSuccess as aQ, isValidIp as aR, isValidIpv4 as aS, isValidIpv6 as aT, parseAcceptLanguage as aU, parseClientHintHeaders as aV, parseContentDisposition as aW, parseContentRangeHeader as aX, parseDnsResponse as aY, parseGeoResponse as aZ, parseHar as a_, type SameSiteValue as aa, type SitemapIndexEntry as ab, type SitemapIssue as ac, type SitemapSplitFile as ad, type SitemapUrlEntry as ae, type SitemapValidationResult as af, type SplitSitemapOptions as ag, type SplitSitemapResult as ah, type StatusCode as ai, type UaDeviceType as aj, type UserAgentInfo as ak, type VaryHeaderEntry as al, type VaryHeaderResult as am, type XContentTypeOptionsHeader as an, type XContentTypeOptionsParseResult as ao, X_CONTENT_TYPE_OPTIONS_HEADER as ap, analyzeEmailHeaders as aq, assessContentTypeRisk as ar, buildAcceptLanguage as as, buildCacheControl as at, buildClientHints as au, buildContentDisposition as av, buildDnsQueryUrl as aw, buildGeoUrl as ax, buildLinkHeader as ay, buildMapUrl as az, type AuthResultEntry as b, parsePermissionsPolicy as b0, parseUserAgent as b1, parseVaryHeader as b2, parseXContentTypeOptionsHeader as b3, searchHeaders as b4, searchStatusCodes as b5, splitSitemap as b6, statusCodeToText as b7, typeNumberToLabel as b8, validateDomain as b9, validateHeaderName as ba, validateHeaderValue as bb, validateManifest as bc, validateRobotsTxt as bd, validateSitemap as be, type CacheControlDirective as c, type CacheControlOptions as d, type CacheControlResult as e, type ClientHintDef as f, type ClientHintValueType as g, type ClientHintsBuildResult as h, type ClientHintsParseResult as i, type ContentDispositionBuildOptions as j, type ContentDispositionBuildResult as k, type ContentDispositionParseResult as l, type ContentRangeResult as m, network as n, type ContentTypeRiskResult as o, type ContentTypeSniffRisk as p, type CookieAttributes as q, type CookieCheckResult as r, type DnsRecord as s, type DnsRecordType as t, type DnsResponse as u, type EmailHeaderField as v, type HarEntry as w, type HarParseResult as x, type HarSummary as y, type HeaderCategory as z };
|
package/dist/tools/network.cjs
CHANGED
|
@@ -2770,6 +2770,58 @@ function assessContentTypeRisk(contentType) {
|
|
|
2770
2770
|
reason: "Not a well-known type in this tool's lookup table. Treat any response type as sniffable unless you've confirmed the serving browser trusts it, and set nosniff regardless of type as a baseline defense."
|
|
2771
2771
|
};
|
|
2772
2772
|
}
|
|
2773
|
+
function formatAcceptLanguageQuality(q) {
|
|
2774
|
+
let s = q.toFixed(3);
|
|
2775
|
+
s = s.replace(/0+$/, "");
|
|
2776
|
+
s = s.replace(/\.$/, "");
|
|
2777
|
+
return s;
|
|
2778
|
+
}
|
|
2779
|
+
function formatAcceptLanguageEntries(entries) {
|
|
2780
|
+
return entries.map((e) => e.quality === 1 ? e.locale : `${e.locale};q=${formatAcceptLanguageQuality(e.quality)}`).join(", ");
|
|
2781
|
+
}
|
|
2782
|
+
function sortAcceptLanguageEntries(entries) {
|
|
2783
|
+
return entries.map((e, i) => ({ e, i })).sort((a, b) => b.e.quality - a.e.quality || a.i - b.i).map((x) => x.e);
|
|
2784
|
+
}
|
|
2785
|
+
function buildAcceptLanguage(locales) {
|
|
2786
|
+
if (!Array.isArray(locales) || locales.length === 0) return { error: "At least one locale is required" };
|
|
2787
|
+
const entries = [];
|
|
2788
|
+
for (let i = 0; i < locales.length; i++) {
|
|
2789
|
+
const { locale, quality } = locales[i];
|
|
2790
|
+
if (typeof locale !== "string" || locale.trim() === "") return { error: `locale ${i + 1}: locale is required` };
|
|
2791
|
+
const q = quality === void 0 ? 1 : quality;
|
|
2792
|
+
if (typeof q !== "number" || !Number.isFinite(q) || q < 0 || q > 1) {
|
|
2793
|
+
return { error: `locale ${i + 1}: quality must be between 0 and 1` };
|
|
2794
|
+
}
|
|
2795
|
+
entries.push({ locale: locale.trim(), quality: Math.round(q * 1e3) / 1e3 });
|
|
2796
|
+
}
|
|
2797
|
+
const sorted = sortAcceptLanguageEntries(entries);
|
|
2798
|
+
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
2799
|
+
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
2800
|
+
}
|
|
2801
|
+
function parseAcceptLanguage(raw) {
|
|
2802
|
+
if (!raw || raw.trim() === "") return { error: "Input is empty" };
|
|
2803
|
+
const withoutLabel = raw.trim().replace(/^accept-language:\s*/i, "");
|
|
2804
|
+
const parts = withoutLabel.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
|
|
2805
|
+
if (parts.length === 0) return { error: "Input is empty" };
|
|
2806
|
+
const entries = [];
|
|
2807
|
+
for (const part of parts) {
|
|
2808
|
+
const [localeRaw, ...paramsRaw] = part.split(";").map((s) => s.trim());
|
|
2809
|
+
if (!localeRaw) return { error: `Invalid entry: "${part}"` };
|
|
2810
|
+
let quality = 1;
|
|
2811
|
+
for (const param of paramsRaw) {
|
|
2812
|
+
const m = /^q=([\d.]+)$/i.exec(param);
|
|
2813
|
+
if (!m) return { error: `Invalid parameter in "${part}"` };
|
|
2814
|
+
quality = Number(m[1]);
|
|
2815
|
+
if (!Number.isFinite(quality) || quality < 0 || quality > 1) {
|
|
2816
|
+
return { error: `q value must be between 0 and 1 in "${part}"` };
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
entries.push({ locale: localeRaw, quality: Math.round(quality * 1e3) / 1e3 });
|
|
2820
|
+
}
|
|
2821
|
+
const sorted = sortAcceptLanguageEntries(entries);
|
|
2822
|
+
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
2823
|
+
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
2824
|
+
}
|
|
2773
2825
|
|
|
2774
2826
|
exports.CLIENT_HINTS = CLIENT_HINTS;
|
|
2775
2827
|
exports.DNS_RECORD_TYPES = DNS_RECORD_TYPES;
|
|
@@ -2781,6 +2833,7 @@ exports.STATUS_CODES = STATUS_CODES;
|
|
|
2781
2833
|
exports.X_CONTENT_TYPE_OPTIONS_HEADER = X_CONTENT_TYPE_OPTIONS_HEADER;
|
|
2782
2834
|
exports.analyzeEmailHeaders = analyzeEmailHeaders;
|
|
2783
2835
|
exports.assessContentTypeRisk = assessContentTypeRisk;
|
|
2836
|
+
exports.buildAcceptLanguage = buildAcceptLanguage;
|
|
2784
2837
|
exports.buildCacheControl = buildCacheControl;
|
|
2785
2838
|
exports.buildClientHints = buildClientHints;
|
|
2786
2839
|
exports.buildContentDisposition = buildContentDisposition;
|
|
@@ -2808,6 +2861,7 @@ exports.isSuccess = isSuccess;
|
|
|
2808
2861
|
exports.isValidIp = isValidIp;
|
|
2809
2862
|
exports.isValidIpv4 = isValidIpv4;
|
|
2810
2863
|
exports.isValidIpv6 = isValidIpv6;
|
|
2864
|
+
exports.parseAcceptLanguage = parseAcceptLanguage;
|
|
2811
2865
|
exports.parseClientHintHeaders = parseClientHintHeaders;
|
|
2812
2866
|
exports.parseContentDisposition = parseContentDisposition;
|
|
2813
2867
|
exports.parseContentRangeHeader = parseContentRangeHeader;
|
package/dist/tools/network.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AuthResultEntry, B as BuildRangeHeaderOptions, C as CLIENT_HINTS,
|
|
1
|
+
export { A as AcceptLanguageEntry, a as AcceptLanguageResult, b as AuthResultEntry, B as BuildRangeHeaderOptions, C as CLIENT_HINTS, c as CacheControlDirective, d as CacheControlOptions, e as CacheControlResult, f as ClientHintDef, g as ClientHintValueType, h as ClientHintsBuildResult, i as ClientHintsParseResult, j as ContentDispositionBuildOptions, k as ContentDispositionBuildResult, l as ContentDispositionParseResult, m as ContentRangeResult, o as ContentTypeRiskResult, p as ContentTypeSniffRisk, q as CookieAttributes, r as CookieCheckResult, D as DNS_RECORD_TYPES, s as DnsRecord, t as DnsRecordType, u as DnsResponse, E as EmailHeaderAnalysis, v as EmailHeaderField, G as GeoResult, H as HTTP_HEADERS, w as HarEntry, x as HarParseResult, y as HarSummary, z as HeaderCategory, F as HttpHeader, I as Ipv6AddressType, J as Ipv6ParseResult, L as LINK_REL_VALUES, K as LinkHeaderEntry, M as LinkHeaderEntryInput, N as LinkHeaderResult, O as LinkRel, P as ManifestIconInfo, Q as ManifestIssue, R as ManifestValidationResult, S as PERMISSIONS_POLICY_FEATURES, T as ParsedClientHint, U as ParsedDnsResult, V as ParsedGeoResult, W as PermissionsPolicyDirective, X as PermissionsPolicyFeatureInput, Y as PermissionsPolicyResult, Z as REFERRER_POLICY_VALUES, _ as RangeEntry, $ as RangeEntryInput, a0 as RangeHeaderResult, a1 as ReceivedHop, a2 as ReferrerPolicyEntry, a3 as ReferrerPolicyResult, a4 as ReferrerPolicyValue, a5 as RobotsGroup, a6 as RobotsIssue, a7 as RobotsRule, a8 as RobotsValidationResult, a9 as STATUS_CODES, aa as SameSiteValue, ab as SitemapIndexEntry, ac as SitemapIssue, ad as SitemapSplitFile, ae as SitemapUrlEntry, af as SitemapValidationResult, ag as SplitSitemapOptions, ah as SplitSitemapResult, ai as StatusCode, aj as UaDeviceType, ak as UserAgentInfo, al as VaryHeaderEntry, am as VaryHeaderResult, an as XContentTypeOptionsHeader, ao as XContentTypeOptionsParseResult, ap as X_CONTENT_TYPE_OPTIONS_HEADER, aq as analyzeEmailHeaders, ar as assessContentTypeRisk, as as buildAcceptLanguage, at as buildCacheControl, au as buildClientHints, av as buildContentDisposition, aw as buildDnsQueryUrl, ax as buildGeoUrl, ay as buildLinkHeader, az as buildMapUrl, aA as buildPermissionsPolicy, aB as buildRangeHeader, aC as buildReferrerPolicy, aD as buildVaryHeader, aE as buildXContentTypeOptionsHeader, aF as checkSetCookieHeader, aG as countryCodeToFlag, aH as formatCoordinates, aI as formatTtl, aJ as getByCategory, aK as getHeader, aL as getHeadersByCategory, aM as getStatusByCategory, aN as getStatusCode, aO as isClientError, aP as isServerError, aQ as isSuccess, aR as isValidIp, aS as isValidIpv4, aT as isValidIpv6, aU as parseAcceptLanguage, aV as parseClientHintHeaders, aW as parseContentDisposition, aX as parseContentRangeHeader, aY as parseDnsResponse, aZ as parseGeoResponse, a_ as parseHar, a$ as parseIpv6Address, b0 as parsePermissionsPolicy, b1 as parseUserAgent, b2 as parseVaryHeader, b3 as parseXContentTypeOptionsHeader, b4 as searchHeaders, b5 as searchStatusCodes, b6 as splitSitemap, b7 as statusCodeToText, b8 as typeNumberToLabel, b9 as validateDomain, ba as validateHeaderName, bb as validateHeaderValue, bc as validateManifest, bd as validateRobotsTxt, be as validateSitemap } from '../network-CoGf7_Op.cjs';
|
package/dist/tools/network.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AuthResultEntry, B as BuildRangeHeaderOptions, C as CLIENT_HINTS,
|
|
1
|
+
export { A as AcceptLanguageEntry, a as AcceptLanguageResult, b as AuthResultEntry, B as BuildRangeHeaderOptions, C as CLIENT_HINTS, c as CacheControlDirective, d as CacheControlOptions, e as CacheControlResult, f as ClientHintDef, g as ClientHintValueType, h as ClientHintsBuildResult, i as ClientHintsParseResult, j as ContentDispositionBuildOptions, k as ContentDispositionBuildResult, l as ContentDispositionParseResult, m as ContentRangeResult, o as ContentTypeRiskResult, p as ContentTypeSniffRisk, q as CookieAttributes, r as CookieCheckResult, D as DNS_RECORD_TYPES, s as DnsRecord, t as DnsRecordType, u as DnsResponse, E as EmailHeaderAnalysis, v as EmailHeaderField, G as GeoResult, H as HTTP_HEADERS, w as HarEntry, x as HarParseResult, y as HarSummary, z as HeaderCategory, F as HttpHeader, I as Ipv6AddressType, J as Ipv6ParseResult, L as LINK_REL_VALUES, K as LinkHeaderEntry, M as LinkHeaderEntryInput, N as LinkHeaderResult, O as LinkRel, P as ManifestIconInfo, Q as ManifestIssue, R as ManifestValidationResult, S as PERMISSIONS_POLICY_FEATURES, T as ParsedClientHint, U as ParsedDnsResult, V as ParsedGeoResult, W as PermissionsPolicyDirective, X as PermissionsPolicyFeatureInput, Y as PermissionsPolicyResult, Z as REFERRER_POLICY_VALUES, _ as RangeEntry, $ as RangeEntryInput, a0 as RangeHeaderResult, a1 as ReceivedHop, a2 as ReferrerPolicyEntry, a3 as ReferrerPolicyResult, a4 as ReferrerPolicyValue, a5 as RobotsGroup, a6 as RobotsIssue, a7 as RobotsRule, a8 as RobotsValidationResult, a9 as STATUS_CODES, aa as SameSiteValue, ab as SitemapIndexEntry, ac as SitemapIssue, ad as SitemapSplitFile, ae as SitemapUrlEntry, af as SitemapValidationResult, ag as SplitSitemapOptions, ah as SplitSitemapResult, ai as StatusCode, aj as UaDeviceType, ak as UserAgentInfo, al as VaryHeaderEntry, am as VaryHeaderResult, an as XContentTypeOptionsHeader, ao as XContentTypeOptionsParseResult, ap as X_CONTENT_TYPE_OPTIONS_HEADER, aq as analyzeEmailHeaders, ar as assessContentTypeRisk, as as buildAcceptLanguage, at as buildCacheControl, au as buildClientHints, av as buildContentDisposition, aw as buildDnsQueryUrl, ax as buildGeoUrl, ay as buildLinkHeader, az as buildMapUrl, aA as buildPermissionsPolicy, aB as buildRangeHeader, aC as buildReferrerPolicy, aD as buildVaryHeader, aE as buildXContentTypeOptionsHeader, aF as checkSetCookieHeader, aG as countryCodeToFlag, aH as formatCoordinates, aI as formatTtl, aJ as getByCategory, aK as getHeader, aL as getHeadersByCategory, aM as getStatusByCategory, aN as getStatusCode, aO as isClientError, aP as isServerError, aQ as isSuccess, aR as isValidIp, aS as isValidIpv4, aT as isValidIpv6, aU as parseAcceptLanguage, aV as parseClientHintHeaders, aW as parseContentDisposition, aX as parseContentRangeHeader, aY as parseDnsResponse, aZ as parseGeoResponse, a_ as parseHar, a$ as parseIpv6Address, b0 as parsePermissionsPolicy, b1 as parseUserAgent, b2 as parseVaryHeader, b3 as parseXContentTypeOptionsHeader, b4 as searchHeaders, b5 as searchStatusCodes, b6 as splitSitemap, b7 as statusCodeToText, b8 as typeNumberToLabel, b9 as validateDomain, ba as validateHeaderName, bb as validateHeaderValue, bc as validateManifest, bd as validateRobotsTxt, be as validateSitemap } from '../network-CoGf7_Op.js';
|
package/dist/tools/network.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, X_CONTENT_TYPE_OPTIONS_HEADER, analyzeEmailHeaders, assessContentTypeRisk, buildCacheControl, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap } from '../chunk-
|
|
1
|
+
export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, X_CONTENT_TYPE_OPTIONS_HEADER, analyzeEmailHeaders, assessContentTypeRisk, buildAcceptLanguage, buildCacheControl, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, parseAcceptLanguage, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap } from '../chunk-TVSQ53TZ.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -2172,6 +2172,45 @@ function calculateDebtToIncomeRatio(debts, grossMonthlyIncome) {
|
|
|
2172
2172
|
tier: _classifyDti(dtiPercent)
|
|
2173
2173
|
};
|
|
2174
2174
|
}
|
|
2175
|
+
function calculateBlendedLoanRate(loans) {
|
|
2176
|
+
if (!Array.isArray(loans) || loans.length === 0) {
|
|
2177
|
+
return { error: "loans must be a non-empty array" };
|
|
2178
|
+
}
|
|
2179
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2180
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
2181
|
+
let totalBalance = 0;
|
|
2182
|
+
for (let i = 0; i < loans.length; i++) {
|
|
2183
|
+
const loan = loans[i];
|
|
2184
|
+
if (typeof loan.balance !== "number" || !Number.isFinite(loan.balance) || loan.balance <= 0) {
|
|
2185
|
+
return { error: `loan ${i + 1}: balance must be a finite number greater than zero` };
|
|
2186
|
+
}
|
|
2187
|
+
if (typeof loan.ratePercent !== "number" || !Number.isFinite(loan.ratePercent) || loan.ratePercent < 0) {
|
|
2188
|
+
return { error: `loan ${i + 1}: ratePercent must be a finite, non-negative number` };
|
|
2189
|
+
}
|
|
2190
|
+
totalBalance += loan.balance;
|
|
2191
|
+
}
|
|
2192
|
+
let totalMonthlyInterest = 0;
|
|
2193
|
+
let weightedRateSum = 0;
|
|
2194
|
+
const results = loans.map((loan, i) => {
|
|
2195
|
+
const monthlyInterest = round22(loan.balance * loan.ratePercent / 100 / 12);
|
|
2196
|
+
totalMonthlyInterest += monthlyInterest;
|
|
2197
|
+
weightedRateSum += loan.balance * loan.ratePercent;
|
|
2198
|
+
return {
|
|
2199
|
+
label: loan.label?.trim() || `Loan ${i + 1}`,
|
|
2200
|
+
balance: loan.balance,
|
|
2201
|
+
ratePercent: loan.ratePercent,
|
|
2202
|
+
monthlyInterest,
|
|
2203
|
+
shareOfTotalPercent: round22(loan.balance / totalBalance * 100)
|
|
2204
|
+
};
|
|
2205
|
+
});
|
|
2206
|
+
return {
|
|
2207
|
+
loans: results,
|
|
2208
|
+
totalBalance: round22(totalBalance),
|
|
2209
|
+
weightedAverageRatePercent: round4(weightedRateSum / totalBalance),
|
|
2210
|
+
totalMonthlyInterest: round22(totalMonthlyInterest),
|
|
2211
|
+
totalAnnualInterest: round22(totalMonthlyInterest * 12)
|
|
2212
|
+
};
|
|
2213
|
+
}
|
|
2175
2214
|
|
|
2176
2215
|
exports.BASE_LABELS = BASE_LABELS;
|
|
2177
2216
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -2191,6 +2230,7 @@ exports.autoFormat = autoFormat;
|
|
|
2191
2230
|
exports.bumpVersion = bumpVersion;
|
|
2192
2231
|
exports.calcAspectRatio = calcAspectRatio;
|
|
2193
2232
|
exports.calcSubnet = calcSubnet;
|
|
2233
|
+
exports.calculateBlendedLoanRate = calculateBlendedLoanRate;
|
|
2194
2234
|
exports.calculateBreakEven = calculateBreakEven;
|
|
2195
2235
|
exports.calculateCashBreakdown = calculateCashBreakdown;
|
|
2196
2236
|
exports.calculateCashRounding = calculateCashRounding;
|
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 BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtToIncomeRatioResult, O as DepreciationMethod, P as DepreciationResult, Q as DepreciationYear, R as Dimensions, S as DiscountField, T as DiscountInput, U as DiscountResult, V as DtiTier, W as EmiResult, X as EmiTenureUnit, Y as EmiYearlyBreakdownRow, Z as FilePermissions, _ as FormatOptions, $ as GPA_GRADE_POINTS, a0 as GpaCourse, a1 as GpaCourseResult, a2 as GpaResult, a3 as IbanValidationResult, a4 as IpConversion, a5 as IsbnFormat, a6 as IsbnResult, a7 as LoanBalanceInput, a8 as LoanBalanceResult, a9 as LoanResult, aa as MarginMarkupField, ab as MarginMarkupInput, ac as MarginMarkupResult, ad as MovingAveragePoint, ae as MovingAverageResult, af as NotationStyle, ag as NumberBase, ah as PaybackPeriodInput, ai as PaybackPeriodResult, aj as PercentChangeDirection, ak as PercentageChangeResult, al as Permission, am as PxConvertResult, an as RoiInput, ao as RoiResult, ap as RuleOf72Direction, aq as RuleOf72Result, ar as SavingsGoalInput, as as SavingsGoalMode, at as SavingsGoalResult, au as SemverVersion, av as SimpleInterestResult, aw as SubnetInfo, ax as SuccessiveDiscountResult, ay as SuccessiveDiscountStep, az as TaxDirection, aA as TaxResult, aB as TimeValueDirection, aC as TimeValueResult, aD as TipSplitResult, aE as USD_DENOMINATIONS, aF as UnitPriceItem, aG as UnitPriceResult, aH as UtilizationTier, aI as VideoBitrateInput, aJ as VideoBitrateMode, aK as VideoBitrateResult, aL as ViewportConvertResult, aM as applySuccessiveDiscounts, aN as autoFormat, aO as bumpVersion, aP as calcAspectRatio, aQ as calcSubnet, aR as calculateBlendedLoanRate, aS as calculateBreakEven, aT as calculateCashBreakdown, aU as calculateCashRounding, aV as calculateCdMaturity, aW as calculateChange, aX as calculateCompoundInterest, aY as calculateCreditUtilization, aZ as calculateDebtToIncomeRatio, a_ as calculateDepreciationSchedule, a$ as calculateDiscount, b0 as calculateEmi, b1 as calculateGpa, b2 as calculateLoan, b3 as calculateMarginMarkup, b4 as calculateMovingAverages, b5 as calculatePaybackPeriod, b6 as calculatePercentageChange, b7 as calculateRoi, b8 as calculateRuleOf72, b9 as calculateSavingsGoal, ba as calculateSimpleInterest, bb as calculateTax, bc as calculateTimeValue, bd as calculateTipSplit, be as calculateVideoBitrate, bf as compareSemver, bg as compareUnitPrices, bh as convert, bi as convertAprApy, bj as convertBytes, bk as convertIp, bl as coverBox, bm as decimalToIp, bn as decimalToIpCidr, bo as describePermissions, bp as fitIntoBox, bq as formatNumber, br as formatValue, bs as formatVwValue, bt as formatWithSeparator, bu as gcd, bv as ipFromBinary, bw as ipFromDecimal, bx as ipFromHex, by as ipToBinary, bz as ipToDecimal, bA as ipToDecimalCidr, bB as ipToHex, bC as ipToOctal, bD as isValid, bE as isValidCidr, bF as isValidIp, bG as isValidIpv4, bH as marginToMarkup, bI as markupToMargin, bJ as octalToPermissions, bK as parseFileSize, bL as parseInput, bM as parseNumberString, bN as parseSemver, bO as permissionsToChmod, bP as permissionsToOctal, bQ as permissionsToSymbolic, bR as ptToPx, bS as pxToAll, bT as pxToViewport, bU as remToPx, bV as satisfiesRange, bW as scaleByHeight, bX as scaleByWidth, bY as sortVersions, bZ as splitSubnet, b_ as symbolicToPermissions, b$ as validateBarcode, c0 as validateCardNumber, c1 as validateIban, c2 as validateIsbn, c3 as viewportToPx } from '../units-BM9GkUZW.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 BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtToIncomeRatioResult, O as DepreciationMethod, P as DepreciationResult, Q as DepreciationYear, R as Dimensions, S as DiscountField, T as DiscountInput, U as DiscountResult, V as DtiTier, W as EmiResult, X as EmiTenureUnit, Y as EmiYearlyBreakdownRow, Z as FilePermissions, _ as FormatOptions, $ as GPA_GRADE_POINTS, a0 as GpaCourse, a1 as GpaCourseResult, a2 as GpaResult, a3 as IbanValidationResult, a4 as IpConversion, a5 as IsbnFormat, a6 as IsbnResult, a7 as LoanBalanceInput, a8 as LoanBalanceResult, a9 as LoanResult, aa as MarginMarkupField, ab as MarginMarkupInput, ac as MarginMarkupResult, ad as MovingAveragePoint, ae as MovingAverageResult, af as NotationStyle, ag as NumberBase, ah as PaybackPeriodInput, ai as PaybackPeriodResult, aj as PercentChangeDirection, ak as PercentageChangeResult, al as Permission, am as PxConvertResult, an as RoiInput, ao as RoiResult, ap as RuleOf72Direction, aq as RuleOf72Result, ar as SavingsGoalInput, as as SavingsGoalMode, at as SavingsGoalResult, au as SemverVersion, av as SimpleInterestResult, aw as SubnetInfo, ax as SuccessiveDiscountResult, ay as SuccessiveDiscountStep, az as TaxDirection, aA as TaxResult, aB as TimeValueDirection, aC as TimeValueResult, aD as TipSplitResult, aE as USD_DENOMINATIONS, aF as UnitPriceItem, aG as UnitPriceResult, aH as UtilizationTier, aI as VideoBitrateInput, aJ as VideoBitrateMode, aK as VideoBitrateResult, aL as ViewportConvertResult, aM as applySuccessiveDiscounts, aN as autoFormat, aO as bumpVersion, aP as calcAspectRatio, aQ as calcSubnet, aR as calculateBlendedLoanRate, aS as calculateBreakEven, aT as calculateCashBreakdown, aU as calculateCashRounding, aV as calculateCdMaturity, aW as calculateChange, aX as calculateCompoundInterest, aY as calculateCreditUtilization, aZ as calculateDebtToIncomeRatio, a_ as calculateDepreciationSchedule, a$ as calculateDiscount, b0 as calculateEmi, b1 as calculateGpa, b2 as calculateLoan, b3 as calculateMarginMarkup, b4 as calculateMovingAverages, b5 as calculatePaybackPeriod, b6 as calculatePercentageChange, b7 as calculateRoi, b8 as calculateRuleOf72, b9 as calculateSavingsGoal, ba as calculateSimpleInterest, bb as calculateTax, bc as calculateTimeValue, bd as calculateTipSplit, be as calculateVideoBitrate, bf as compareSemver, bg as compareUnitPrices, bh as convert, bi as convertAprApy, bj as convertBytes, bk as convertIp, bl as coverBox, bm as decimalToIp, bn as decimalToIpCidr, bo as describePermissions, bp as fitIntoBox, bq as formatNumber, br as formatValue, bs as formatVwValue, bt as formatWithSeparator, bu as gcd, bv as ipFromBinary, bw as ipFromDecimal, bx as ipFromHex, by as ipToBinary, bz as ipToDecimal, bA as ipToDecimalCidr, bB as ipToHex, bC as ipToOctal, bD as isValid, bE as isValidCidr, bF as isValidIp, bG as isValidIpv4, bH as marginToMarkup, bI as markupToMargin, bJ as octalToPermissions, bK as parseFileSize, bL as parseInput, bM as parseNumberString, bN as parseSemver, bO as permissionsToChmod, bP as permissionsToOctal, bQ as permissionsToSymbolic, bR as ptToPx, bS as pxToAll, bT as pxToViewport, bU as remToPx, bV as satisfiesRange, bW as scaleByHeight, bX as scaleByWidth, bY as sortVersions, bZ as splitSubnet, b_ as symbolicToPermissions, b$ as validateBarcode, c0 as validateCardNumber, c1 as validateIban, c2 as validateIsbn, c3 as viewportToPx } from '../units-BM9GkUZW.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, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, 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, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, 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-MRIGQRTU.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
* - payback-period-calculator : calculatePaybackPeriod
|
|
37
37
|
* - cd-maturity-calculator : calculateCdMaturity
|
|
38
38
|
* - depreciation-schedule-calculator : calculateDepreciationSchedule
|
|
39
|
+
* - blended-loan-rate-calculator : calculateBlendedLoanRate
|
|
39
40
|
*/
|
|
40
41
|
interface PxConvertResult {
|
|
41
42
|
px: number;
|
|
@@ -1026,6 +1027,35 @@ interface DebtToIncomeRatioResult {
|
|
|
1026
1027
|
declare function calculateDebtToIncomeRatio(debts: DebtItemInput[], grossMonthlyIncome: number): DebtToIncomeRatioResult | {
|
|
1027
1028
|
error: string;
|
|
1028
1029
|
};
|
|
1030
|
+
interface LoanBalanceInput {
|
|
1031
|
+
label?: string;
|
|
1032
|
+
balance: number;
|
|
1033
|
+
ratePercent: number;
|
|
1034
|
+
}
|
|
1035
|
+
interface LoanBalanceResult {
|
|
1036
|
+
label: string;
|
|
1037
|
+
balance: number;
|
|
1038
|
+
ratePercent: number;
|
|
1039
|
+
monthlyInterest: number;
|
|
1040
|
+
shareOfTotalPercent: number;
|
|
1041
|
+
}
|
|
1042
|
+
interface BlendedLoanRateResult {
|
|
1043
|
+
loans: LoanBalanceResult[];
|
|
1044
|
+
totalBalance: number;
|
|
1045
|
+
weightedAverageRatePercent: number;
|
|
1046
|
+
totalMonthlyInterest: number;
|
|
1047
|
+
totalAnnualInterest: number;
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Compute the single weighted-average interest rate across a list of loan
|
|
1051
|
+
* balances (e.g. multiple credit cards or student loans being weighed for
|
|
1052
|
+
* consolidation), weighting each loan's rate by its share of the combined
|
|
1053
|
+
* balance, plus the combined monthly and annual interest accrual. Pure
|
|
1054
|
+
* arithmetic, no live rate feed.
|
|
1055
|
+
*/
|
|
1056
|
+
declare function calculateBlendedLoanRate(loans: LoanBalanceInput[]): BlendedLoanRateResult | {
|
|
1057
|
+
error: string;
|
|
1058
|
+
};
|
|
1029
1059
|
|
|
1030
1060
|
type units_AmortizationRow = AmortizationRow;
|
|
1031
1061
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -1037,6 +1067,7 @@ declare const units_BYTE_UNITS: typeof BYTE_UNITS;
|
|
|
1037
1067
|
type units_BarcodeFormat = BarcodeFormat;
|
|
1038
1068
|
type units_BarcodeValidationResult = BarcodeValidationResult;
|
|
1039
1069
|
type units_BaseConvertResult = BaseConvertResult;
|
|
1070
|
+
type units_BlendedLoanRateResult = BlendedLoanRateResult;
|
|
1040
1071
|
type units_BreakEvenInput = BreakEvenInput;
|
|
1041
1072
|
type units_BreakEvenResult = BreakEvenResult;
|
|
1042
1073
|
type units_ByteConvertResult = ByteConvertResult;
|
|
@@ -1086,6 +1117,8 @@ type units_IbanValidationResult = IbanValidationResult;
|
|
|
1086
1117
|
type units_IpConversion = IpConversion;
|
|
1087
1118
|
type units_IsbnFormat = IsbnFormat;
|
|
1088
1119
|
type units_IsbnResult = IsbnResult;
|
|
1120
|
+
type units_LoanBalanceInput = LoanBalanceInput;
|
|
1121
|
+
type units_LoanBalanceResult = LoanBalanceResult;
|
|
1089
1122
|
type units_LoanResult = LoanResult;
|
|
1090
1123
|
type units_MarginMarkupField = MarginMarkupField;
|
|
1091
1124
|
type units_MarginMarkupInput = MarginMarkupInput;
|
|
@@ -1130,6 +1163,7 @@ declare const units_autoFormat: typeof autoFormat;
|
|
|
1130
1163
|
declare const units_bumpVersion: typeof bumpVersion;
|
|
1131
1164
|
declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
1132
1165
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
1166
|
+
declare const units_calculateBlendedLoanRate: typeof calculateBlendedLoanRate;
|
|
1133
1167
|
declare const units_calculateBreakEven: typeof calculateBreakEven;
|
|
1134
1168
|
declare const units_calculateCashBreakdown: typeof calculateCashBreakdown;
|
|
1135
1169
|
declare const units_calculateCashRounding: typeof calculateCashRounding;
|
|
@@ -1209,7 +1243,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1209
1243
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1210
1244
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1211
1245
|
declare namespace units {
|
|
1212
|
-
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_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_DebtItemInput as DebtItemInput, type units_DebtItemResult as DebtItemResult, type units_DebtToIncomeRatioResult as DebtToIncomeRatioResult, 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_DtiTier as DtiTier, 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, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, 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_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, 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_UtilizationTier as UtilizationTier, 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_calculateCreditUtilization as calculateCreditUtilization, units_calculateDebtToIncomeRatio as calculateDebtToIncomeRatio, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMovingAverages as calculateMovingAverages, 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 };
|
|
1246
|
+
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_BlendedLoanRateResult as BlendedLoanRateResult, 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_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_DebtItemInput as DebtItemInput, type units_DebtItemResult as DebtItemResult, type units_DebtToIncomeRatioResult as DebtToIncomeRatioResult, 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_DtiTier as DtiTier, 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, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanBalanceInput as LoanBalanceInput, type units_LoanBalanceResult as LoanBalanceResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, 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_UtilizationTier as UtilizationTier, 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_calculateBlendedLoanRate as calculateBlendedLoanRate, 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_calculateCreditUtilization as calculateCreditUtilization, units_calculateDebtToIncomeRatio as calculateDebtToIncomeRatio, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMovingAverages as calculateMovingAverages, 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 };
|
|
1213
1247
|
}
|
|
1214
1248
|
|
|
1215
|
-
export {
|
|
1249
|
+
export { GPA_GRADE_POINTS as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CashRoundingResult as D, type CdMaturityResult as E, type CompareUnitPricesResult as F, type CompoundInterestResult as G, type CompoundYearRow as H, type CreditAccountInput as I, type CreditAccountResult as J, type CreditUtilizationResult as K, type DebtItemInput as L, type DebtItemResult as M, type DebtToIncomeRatioResult as N, type DepreciationMethod as O, type DepreciationResult as P, type DepreciationYear as Q, type Dimensions as R, type DiscountField as S, type DiscountInput as T, type DiscountResult as U, type DtiTier as V, type EmiResult as W, type EmiTenureUnit as X, type EmiYearlyBreakdownRow as Y, type FilePermissions as Z, type FormatOptions as _, type AprApyDirection as a, calculateDiscount as a$, type GpaCourse as a0, type GpaCourseResult as a1, type GpaResult as a2, type IbanValidationResult as a3, type IpConversion as a4, type IsbnFormat as a5, type IsbnResult as a6, type LoanBalanceInput as a7, type LoanBalanceResult as a8, type LoanResult as a9, type TaxResult as aA, type TimeValueDirection as aB, type TimeValueResult as aC, type TipSplitResult as aD, USD_DENOMINATIONS as aE, type UnitPriceItem as aF, type UnitPriceResult as aG, type UtilizationTier as aH, type VideoBitrateInput as aI, type VideoBitrateMode as aJ, type VideoBitrateResult as aK, type ViewportConvertResult as aL, applySuccessiveDiscounts as aM, autoFormat as aN, bumpVersion as aO, calcAspectRatio as aP, calcSubnet as aQ, calculateBlendedLoanRate as aR, calculateBreakEven as aS, calculateCashBreakdown as aT, calculateCashRounding as aU, calculateCdMaturity as aV, calculateChange as aW, calculateCompoundInterest as aX, calculateCreditUtilization as aY, calculateDebtToIncomeRatio as aZ, calculateDepreciationSchedule as a_, type MarginMarkupField as aa, type MarginMarkupInput as ab, type MarginMarkupResult as ac, type MovingAveragePoint as ad, type MovingAverageResult as ae, type NotationStyle as af, type NumberBase as ag, type PaybackPeriodInput as ah, type PaybackPeriodResult as ai, type PercentChangeDirection as aj, type PercentageChangeResult as ak, type Permission as al, type PxConvertResult as am, type RoiInput as an, type RoiResult as ao, type RuleOf72Direction as ap, type RuleOf72Result as aq, type SavingsGoalInput as ar, type SavingsGoalMode as as, type SavingsGoalResult as at, type SemverVersion as au, type SimpleInterestResult as av, type SubnetInfo as aw, type SuccessiveDiscountResult as ax, type SuccessiveDiscountStep as ay, type TaxDirection as az, type AprApyResult as b, validateBarcode as b$, calculateEmi as b0, calculateGpa as b1, calculateLoan as b2, calculateMarginMarkup as b3, calculateMovingAverages as b4, calculatePaybackPeriod as b5, calculatePercentageChange as b6, calculateRoi as b7, calculateRuleOf72 as b8, calculateSavingsGoal as b9, ipToDecimalCidr as bA, ipToHex as bB, ipToOctal as bC, isValid as bD, isValidCidr as bE, isValidIp as bF, isValidIpv4 as bG, marginToMarkup as bH, markupToMargin as bI, octalToPermissions as bJ, parseFileSize as bK, parseInput as bL, parseNumberString as bM, parseSemver as bN, permissionsToChmod as bO, permissionsToOctal as bP, permissionsToSymbolic as bQ, ptToPx as bR, pxToAll as bS, pxToViewport as bT, remToPx as bU, satisfiesRange as bV, scaleByHeight as bW, scaleByWidth as bX, sortVersions as bY, splitSubnet as bZ, symbolicToPermissions as b_, calculateSimpleInterest as ba, calculateTax as bb, calculateTimeValue as bc, calculateTipSplit as bd, calculateVideoBitrate as be, compareSemver as bf, compareUnitPrices as bg, convert as bh, convertAprApy as bi, convertBytes as bj, convertIp as bk, coverBox as bl, decimalToIp as bm, decimalToIpCidr as bn, describePermissions as bo, fitIntoBox as bp, formatNumber as bq, formatValue as br, formatVwValue as bs, formatWithSeparator as bt, gcd as bu, ipFromBinary as bv, ipFromDecimal as bw, ipFromHex as bx, ipToBinary as by, ipToDecimal as bz, type AspectRatioResult as c, validateCardNumber as c0, validateIban as c1, validateIsbn as c2, viewportToPx as c3, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BlendedLoanRateResult as i, type BreakEvenInput as j, type BreakEvenResult as k, type ByteConvertResult as l, type ByteUnit as m, COMMON_LOCALES as n, COMMON_PERMISSIONS as o, COMMON_RATIOS as p, COMMON_SIZES as q, COMMON_TAX_RATES as r, COMMON_TIP_PERCENTAGES as s, COMMON_VIEWPORTS as t, units as u, type CardValidationResult as v, type CashBreakdownResult as w, type CashChangeResult as x, type CashDenominationItem as y, type CashRoundingMode as z };
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
* - payback-period-calculator : calculatePaybackPeriod
|
|
37
37
|
* - cd-maturity-calculator : calculateCdMaturity
|
|
38
38
|
* - depreciation-schedule-calculator : calculateDepreciationSchedule
|
|
39
|
+
* - blended-loan-rate-calculator : calculateBlendedLoanRate
|
|
39
40
|
*/
|
|
40
41
|
interface PxConvertResult {
|
|
41
42
|
px: number;
|
|
@@ -1026,6 +1027,35 @@ interface DebtToIncomeRatioResult {
|
|
|
1026
1027
|
declare function calculateDebtToIncomeRatio(debts: DebtItemInput[], grossMonthlyIncome: number): DebtToIncomeRatioResult | {
|
|
1027
1028
|
error: string;
|
|
1028
1029
|
};
|
|
1030
|
+
interface LoanBalanceInput {
|
|
1031
|
+
label?: string;
|
|
1032
|
+
balance: number;
|
|
1033
|
+
ratePercent: number;
|
|
1034
|
+
}
|
|
1035
|
+
interface LoanBalanceResult {
|
|
1036
|
+
label: string;
|
|
1037
|
+
balance: number;
|
|
1038
|
+
ratePercent: number;
|
|
1039
|
+
monthlyInterest: number;
|
|
1040
|
+
shareOfTotalPercent: number;
|
|
1041
|
+
}
|
|
1042
|
+
interface BlendedLoanRateResult {
|
|
1043
|
+
loans: LoanBalanceResult[];
|
|
1044
|
+
totalBalance: number;
|
|
1045
|
+
weightedAverageRatePercent: number;
|
|
1046
|
+
totalMonthlyInterest: number;
|
|
1047
|
+
totalAnnualInterest: number;
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Compute the single weighted-average interest rate across a list of loan
|
|
1051
|
+
* balances (e.g. multiple credit cards or student loans being weighed for
|
|
1052
|
+
* consolidation), weighting each loan's rate by its share of the combined
|
|
1053
|
+
* balance, plus the combined monthly and annual interest accrual. Pure
|
|
1054
|
+
* arithmetic, no live rate feed.
|
|
1055
|
+
*/
|
|
1056
|
+
declare function calculateBlendedLoanRate(loans: LoanBalanceInput[]): BlendedLoanRateResult | {
|
|
1057
|
+
error: string;
|
|
1058
|
+
};
|
|
1029
1059
|
|
|
1030
1060
|
type units_AmortizationRow = AmortizationRow;
|
|
1031
1061
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -1037,6 +1067,7 @@ declare const units_BYTE_UNITS: typeof BYTE_UNITS;
|
|
|
1037
1067
|
type units_BarcodeFormat = BarcodeFormat;
|
|
1038
1068
|
type units_BarcodeValidationResult = BarcodeValidationResult;
|
|
1039
1069
|
type units_BaseConvertResult = BaseConvertResult;
|
|
1070
|
+
type units_BlendedLoanRateResult = BlendedLoanRateResult;
|
|
1040
1071
|
type units_BreakEvenInput = BreakEvenInput;
|
|
1041
1072
|
type units_BreakEvenResult = BreakEvenResult;
|
|
1042
1073
|
type units_ByteConvertResult = ByteConvertResult;
|
|
@@ -1086,6 +1117,8 @@ type units_IbanValidationResult = IbanValidationResult;
|
|
|
1086
1117
|
type units_IpConversion = IpConversion;
|
|
1087
1118
|
type units_IsbnFormat = IsbnFormat;
|
|
1088
1119
|
type units_IsbnResult = IsbnResult;
|
|
1120
|
+
type units_LoanBalanceInput = LoanBalanceInput;
|
|
1121
|
+
type units_LoanBalanceResult = LoanBalanceResult;
|
|
1089
1122
|
type units_LoanResult = LoanResult;
|
|
1090
1123
|
type units_MarginMarkupField = MarginMarkupField;
|
|
1091
1124
|
type units_MarginMarkupInput = MarginMarkupInput;
|
|
@@ -1130,6 +1163,7 @@ declare const units_autoFormat: typeof autoFormat;
|
|
|
1130
1163
|
declare const units_bumpVersion: typeof bumpVersion;
|
|
1131
1164
|
declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
1132
1165
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
1166
|
+
declare const units_calculateBlendedLoanRate: typeof calculateBlendedLoanRate;
|
|
1133
1167
|
declare const units_calculateBreakEven: typeof calculateBreakEven;
|
|
1134
1168
|
declare const units_calculateCashBreakdown: typeof calculateCashBreakdown;
|
|
1135
1169
|
declare const units_calculateCashRounding: typeof calculateCashRounding;
|
|
@@ -1209,7 +1243,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1209
1243
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1210
1244
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1211
1245
|
declare namespace units {
|
|
1212
|
-
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_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_DebtItemInput as DebtItemInput, type units_DebtItemResult as DebtItemResult, type units_DebtToIncomeRatioResult as DebtToIncomeRatioResult, 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_DtiTier as DtiTier, 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, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, 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_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, 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_UtilizationTier as UtilizationTier, 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_calculateCreditUtilization as calculateCreditUtilization, units_calculateDebtToIncomeRatio as calculateDebtToIncomeRatio, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMovingAverages as calculateMovingAverages, 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 };
|
|
1246
|
+
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_BlendedLoanRateResult as BlendedLoanRateResult, 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_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_DebtItemInput as DebtItemInput, type units_DebtItemResult as DebtItemResult, type units_DebtToIncomeRatioResult as DebtToIncomeRatioResult, 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_DtiTier as DtiTier, 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, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanBalanceInput as LoanBalanceInput, type units_LoanBalanceResult as LoanBalanceResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, 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_UtilizationTier as UtilizationTier, 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_calculateBlendedLoanRate as calculateBlendedLoanRate, 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_calculateCreditUtilization as calculateCreditUtilization, units_calculateDebtToIncomeRatio as calculateDebtToIncomeRatio, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMovingAverages as calculateMovingAverages, 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 };
|
|
1213
1247
|
}
|
|
1214
1248
|
|
|
1215
|
-
export {
|
|
1249
|
+
export { GPA_GRADE_POINTS as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CashRoundingResult as D, type CdMaturityResult as E, type CompareUnitPricesResult as F, type CompoundInterestResult as G, type CompoundYearRow as H, type CreditAccountInput as I, type CreditAccountResult as J, type CreditUtilizationResult as K, type DebtItemInput as L, type DebtItemResult as M, type DebtToIncomeRatioResult as N, type DepreciationMethod as O, type DepreciationResult as P, type DepreciationYear as Q, type Dimensions as R, type DiscountField as S, type DiscountInput as T, type DiscountResult as U, type DtiTier as V, type EmiResult as W, type EmiTenureUnit as X, type EmiYearlyBreakdownRow as Y, type FilePermissions as Z, type FormatOptions as _, type AprApyDirection as a, calculateDiscount as a$, type GpaCourse as a0, type GpaCourseResult as a1, type GpaResult as a2, type IbanValidationResult as a3, type IpConversion as a4, type IsbnFormat as a5, type IsbnResult as a6, type LoanBalanceInput as a7, type LoanBalanceResult as a8, type LoanResult as a9, type TaxResult as aA, type TimeValueDirection as aB, type TimeValueResult as aC, type TipSplitResult as aD, USD_DENOMINATIONS as aE, type UnitPriceItem as aF, type UnitPriceResult as aG, type UtilizationTier as aH, type VideoBitrateInput as aI, type VideoBitrateMode as aJ, type VideoBitrateResult as aK, type ViewportConvertResult as aL, applySuccessiveDiscounts as aM, autoFormat as aN, bumpVersion as aO, calcAspectRatio as aP, calcSubnet as aQ, calculateBlendedLoanRate as aR, calculateBreakEven as aS, calculateCashBreakdown as aT, calculateCashRounding as aU, calculateCdMaturity as aV, calculateChange as aW, calculateCompoundInterest as aX, calculateCreditUtilization as aY, calculateDebtToIncomeRatio as aZ, calculateDepreciationSchedule as a_, type MarginMarkupField as aa, type MarginMarkupInput as ab, type MarginMarkupResult as ac, type MovingAveragePoint as ad, type MovingAverageResult as ae, type NotationStyle as af, type NumberBase as ag, type PaybackPeriodInput as ah, type PaybackPeriodResult as ai, type PercentChangeDirection as aj, type PercentageChangeResult as ak, type Permission as al, type PxConvertResult as am, type RoiInput as an, type RoiResult as ao, type RuleOf72Direction as ap, type RuleOf72Result as aq, type SavingsGoalInput as ar, type SavingsGoalMode as as, type SavingsGoalResult as at, type SemverVersion as au, type SimpleInterestResult as av, type SubnetInfo as aw, type SuccessiveDiscountResult as ax, type SuccessiveDiscountStep as ay, type TaxDirection as az, type AprApyResult as b, validateBarcode as b$, calculateEmi as b0, calculateGpa as b1, calculateLoan as b2, calculateMarginMarkup as b3, calculateMovingAverages as b4, calculatePaybackPeriod as b5, calculatePercentageChange as b6, calculateRoi as b7, calculateRuleOf72 as b8, calculateSavingsGoal as b9, ipToDecimalCidr as bA, ipToHex as bB, ipToOctal as bC, isValid as bD, isValidCidr as bE, isValidIp as bF, isValidIpv4 as bG, marginToMarkup as bH, markupToMargin as bI, octalToPermissions as bJ, parseFileSize as bK, parseInput as bL, parseNumberString as bM, parseSemver as bN, permissionsToChmod as bO, permissionsToOctal as bP, permissionsToSymbolic as bQ, ptToPx as bR, pxToAll as bS, pxToViewport as bT, remToPx as bU, satisfiesRange as bV, scaleByHeight as bW, scaleByWidth as bX, sortVersions as bY, splitSubnet as bZ, symbolicToPermissions as b_, calculateSimpleInterest as ba, calculateTax as bb, calculateTimeValue as bc, calculateTipSplit as bd, calculateVideoBitrate as be, compareSemver as bf, compareUnitPrices as bg, convert as bh, convertAprApy as bi, convertBytes as bj, convertIp as bk, coverBox as bl, decimalToIp as bm, decimalToIpCidr as bn, describePermissions as bo, fitIntoBox as bp, formatNumber as bq, formatValue as br, formatVwValue as bs, formatWithSeparator as bt, gcd as bu, ipFromBinary as bv, ipFromDecimal as bw, ipFromHex as bx, ipToBinary as by, ipToDecimal as bz, type AspectRatioResult as c, validateCardNumber as c0, validateIban as c1, validateIsbn as c2, viewportToPx as c3, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BlendedLoanRateResult as i, type BreakEvenInput as j, type BreakEvenResult as k, type ByteConvertResult as l, type ByteUnit as m, COMMON_LOCALES as n, COMMON_PERMISSIONS as o, COMMON_RATIOS as p, COMMON_SIZES as q, COMMON_TAX_RATES as r, COMMON_TIP_PERCENTAGES as s, COMMON_VIEWPORTS as t, units as u, type CardValidationResult as v, type CashBreakdownResult as w, type CashChangeResult as x, type CashDenominationItem as y, type CashRoundingMode as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilix-tech/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.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",
|