@utilix-tech/sdk 0.48.0 → 0.50.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 +7 -0
- package/README.md +15 -3
- package/dist/{chunk-4TIY6COQ.js → chunk-BDQXYFTO.js} +50 -1
- package/dist/{chunk-KMQHBUYO.js → chunk-MDREETCH.js} +63 -1
- package/dist/{data-BJVJ879p.d.cts → data-BI_007dA.d.cts} +36 -2
- package/dist/{data-BJVJ879p.d.ts → data-BI_007dA.d.ts} +36 -2
- package/dist/index.cjs +111 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/tools/data.cjs +49 -0
- package/dist/tools/data.d.cts +1 -1
- package/dist/tools/data.d.ts +1 -1
- package/dist/tools/data.js +1 -1
- package/dist/tools/units.cjs +62 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-DU4Pisfx.d.cts → units-DNz6YS5D.d.cts} +52 -2
- package/dist/{units-DU4Pisfx.d.ts → units-DNz6YS5D.d.ts} +52 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.50.0
|
|
6
|
+
- Add `calculateMovingAverages` (moving-average-calculator): compute SMA and EMA series from a list of numbers and a window size.
|
|
7
|
+
- Add `calculateMarkdownTaskListProgress` (markdown-task-list-progress): parse a Markdown document's checkbox task list and report completion percentage overall and per section.
|
|
8
|
+
|
|
9
|
+
## 0.49.0
|
|
10
|
+
- Add `calculateCashRounding` (cash-rounding-calculator): round a cashless total to the nearest payable cash denomination ("Swedish rounding"), with round-nearest, round-up, and round-down modes.
|
|
11
|
+
|
|
5
12
|
## 0.48.0
|
|
6
13
|
- Add `resolveYamlAnchors` (yaml-anchor-resolver): expand YAML anchors, aliases, and merge keys inline, and list which anchors were referenced vs. left unused.
|
|
7
14
|
- Add `splitSitemap` (sitemap-index-splitter): split a URL list exceeding the sitemaps.org 50,000-URL cap into multiple sitemap.xml files plus a sitemap index file.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**640 developer utility functions for Node.js: runs locally, no API key required.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
6
6
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
@@ -205,7 +205,7 @@ import { parseCsv, csvToJson, validateYaml, resolveYamlAnchors, tomlToJson, json
|
|
|
205
205
|
formatXml, xmlToJson, jsonToXml, parseIni,
|
|
206
206
|
validateNdjson, formatNdjson, ndjsonToJsonArray, diffEnvExample,
|
|
207
207
|
parseSubtitles, convertSubtitles, shiftSubtitles, parseFrontMatter,
|
|
208
|
-
generateMarkdownToc, csvToSqlInsert, findCsvDuplicateRows } from "@utilix-tech/sdk/data";
|
|
208
|
+
generateMarkdownToc, csvToSqlInsert, findCsvDuplicateRows, calculateMarkdownTaskListProgress } from "@utilix-tech/sdk/data";
|
|
209
209
|
|
|
210
210
|
// CSV
|
|
211
211
|
const rows = parseCsv("name,age\nalice,30\nbob,25");
|
|
@@ -257,6 +257,10 @@ csvToSqlInsert("name,age\nAlice,30\nBob,25", { tableName: "users" });
|
|
|
257
257
|
// Find duplicate rows in CSV/TSV data, by the whole row or a chosen key column set
|
|
258
258
|
findCsvDuplicateRows("name,email\nAlice,a@x.com\nBob,b@x.com\nAlice,a@x.com");
|
|
259
259
|
// { duplicateGroups: [{ key: ["Alice", "a@x.com"], rowNumbers: [1, 3], count: 2 }], duplicateRowCount: 2, ... }
|
|
260
|
+
|
|
261
|
+
// Markdown task list progress: completion percentage overall and per heading section
|
|
262
|
+
calculateMarkdownTaskListProgress("# Phase 1\n- [x] a\n- [x] b\n## Phase 2\n- [ ] c\n");
|
|
263
|
+
// { totalItems: 3, completedItems: 2, percentComplete: 66.67, sections: [{ section: "Phase 1", ... }, { section: "Phase 2", ... }] }
|
|
260
264
|
```
|
|
261
265
|
|
|
262
266
|
---
|
|
@@ -318,7 +322,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
|
|
|
318
322
|
### `/units`: Conversions
|
|
319
323
|
|
|
320
324
|
```ts
|
|
321
|
-
import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule } from "@utilix-tech/sdk/units";
|
|
325
|
+
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 } from "@utilix-tech/sdk/units";
|
|
322
326
|
|
|
323
327
|
// File sizes
|
|
324
328
|
convertBytes(1073741824, "GB"); // 1
|
|
@@ -440,6 +444,14 @@ calculateCdMaturity(1000, 12, 12, 12, 3);
|
|
|
440
444
|
// Year-by-year depreciation schedule: straight-line, double-declining-balance, or sum-of-years-digits
|
|
441
445
|
calculateDepreciationSchedule(10000, 1000, 5, "straight-line");
|
|
442
446
|
// { totalDepreciation: 9000, schedule: [{ year: 1, depreciationExpense: 1800, accumulatedDepreciation: 1800, bookValue: 8200 }, ...] }
|
|
447
|
+
|
|
448
|
+
// Round a cashless total to the nearest payable cash denomination ("Swedish rounding")
|
|
449
|
+
calculateCashRounding(2.02, 0.05);
|
|
450
|
+
// { total: 2.02, roundingUnit: 0.05, mode: "nearest", roundedTotal: 2, adjustment: -0.02 }
|
|
451
|
+
|
|
452
|
+
// Simple and exponential moving averages over a numeric series
|
|
453
|
+
calculateMovingAverages([102, 104, 101, 108, 112], 3);
|
|
454
|
+
// { windowSize: 3, multiplier: 0.5, latestSma: 107, latestEma: 108.5834, points: [...] }
|
|
443
455
|
```
|
|
444
456
|
|
|
445
457
|
---
|
|
@@ -5,6 +5,7 @@ import { parse, stringify } from 'smol-toml';
|
|
|
5
5
|
// src/tools/data.ts
|
|
6
6
|
var data_exports = {};
|
|
7
7
|
__export(data_exports, {
|
|
8
|
+
calculateMarkdownTaskListProgress: () => calculateMarkdownTaskListProgress,
|
|
8
9
|
convertSubtitles: () => convertSubtitles,
|
|
9
10
|
csvToJson: () => csvToJson,
|
|
10
11
|
csvToSqlInsert: () => csvToSqlInsert,
|
|
@@ -1623,5 +1624,53 @@ function resolveYamlAnchors(yamlText) {
|
|
|
1623
1624
|
const unusedAnchors = seenAnchorNames.filter((name) => !referencedNames.has(name));
|
|
1624
1625
|
return { resolvedYaml, anchors, unusedAnchors, aliasCount };
|
|
1625
1626
|
}
|
|
1627
|
+
function calculateMarkdownTaskListProgress(markdown) {
|
|
1628
|
+
if (typeof markdown !== "string") return { error: "markdown must be a string" };
|
|
1629
|
+
const round2 = (n) => Math.round(n * 100) / 100;
|
|
1630
|
+
const headingRe = /^(#{1,6})\s+(.*)$/;
|
|
1631
|
+
const itemRe = /^(\s*)[-*+]\s+\[([ xX])\]\s+(.*)$/;
|
|
1632
|
+
let currentSection = "(no heading)";
|
|
1633
|
+
const items = [];
|
|
1634
|
+
for (const line of markdown.replace(/\r\n/g, "\n").split("\n")) {
|
|
1635
|
+
const headingMatch = line.match(headingRe);
|
|
1636
|
+
if (headingMatch) {
|
|
1637
|
+
currentSection = headingMatch[2].trim();
|
|
1638
|
+
continue;
|
|
1639
|
+
}
|
|
1640
|
+
const itemMatch = line.match(itemRe);
|
|
1641
|
+
if (itemMatch) {
|
|
1642
|
+
items.push({
|
|
1643
|
+
text: itemMatch[3].trim(),
|
|
1644
|
+
checked: itemMatch[2].toLowerCase() === "x",
|
|
1645
|
+
indent: itemMatch[1].length,
|
|
1646
|
+
section: currentSection
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
const totalItems = items.length;
|
|
1651
|
+
const completedItems = items.filter((i) => i.checked).length;
|
|
1652
|
+
const percentComplete = totalItems === 0 ? 0 : round2(completedItems / totalItems * 100);
|
|
1653
|
+
const sectionOrder = [];
|
|
1654
|
+
const sectionTotals = /* @__PURE__ */ new Map();
|
|
1655
|
+
for (const item of items) {
|
|
1656
|
+
if (!sectionTotals.has(item.section)) {
|
|
1657
|
+
sectionTotals.set(item.section, { total: 0, completed: 0 });
|
|
1658
|
+
sectionOrder.push(item.section);
|
|
1659
|
+
}
|
|
1660
|
+
const s = sectionTotals.get(item.section);
|
|
1661
|
+
s.total++;
|
|
1662
|
+
if (item.checked) s.completed++;
|
|
1663
|
+
}
|
|
1664
|
+
const sections = sectionOrder.map((section) => {
|
|
1665
|
+
const s = sectionTotals.get(section);
|
|
1666
|
+
return {
|
|
1667
|
+
section,
|
|
1668
|
+
total: s.total,
|
|
1669
|
+
completed: s.completed,
|
|
1670
|
+
percentComplete: s.total === 0 ? 0 : round2(s.completed / s.total * 100)
|
|
1671
|
+
};
|
|
1672
|
+
});
|
|
1673
|
+
return { totalItems, completedItems, percentComplete, sections, items };
|
|
1674
|
+
}
|
|
1626
1675
|
|
|
1627
|
-
export { convertSubtitles, csvToJson, csvToSqlInsert, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
1676
|
+
export { calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
@@ -22,6 +22,7 @@ __export(units_exports, {
|
|
|
22
22
|
calcSubnet: () => calcSubnet,
|
|
23
23
|
calculateBreakEven: () => calculateBreakEven,
|
|
24
24
|
calculateCashBreakdown: () => calculateCashBreakdown,
|
|
25
|
+
calculateCashRounding: () => calculateCashRounding,
|
|
25
26
|
calculateCdMaturity: () => calculateCdMaturity,
|
|
26
27
|
calculateChange: () => calculateChange,
|
|
27
28
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
@@ -30,6 +31,7 @@ __export(units_exports, {
|
|
|
30
31
|
calculateEmi: () => calculateEmi,
|
|
31
32
|
calculateLoan: () => calculateLoan,
|
|
32
33
|
calculateMarginMarkup: () => calculateMarginMarkup,
|
|
34
|
+
calculateMovingAverages: () => calculateMovingAverages,
|
|
33
35
|
calculatePaybackPeriod: () => calculatePaybackPeriod,
|
|
34
36
|
calculatePercentageChange: () => calculatePercentageChange,
|
|
35
37
|
calculateRoi: () => calculateRoi,
|
|
@@ -2076,5 +2078,65 @@ function calculateDepreciationSchedule(cost, salvageValue, usefulLifeYears, meth
|
|
|
2076
2078
|
schedule
|
|
2077
2079
|
};
|
|
2078
2080
|
}
|
|
2081
|
+
function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
2082
|
+
if (!Number.isFinite(total)) return { error: "total must be a finite number" };
|
|
2083
|
+
if (!Number.isFinite(roundingUnit) || roundingUnit <= 0) {
|
|
2084
|
+
return { error: "roundingUnit must be a finite number greater than zero" };
|
|
2085
|
+
}
|
|
2086
|
+
if (mode !== "nearest" && mode !== "up" && mode !== "down") {
|
|
2087
|
+
return { error: 'mode must be one of: "nearest", "up", "down"' };
|
|
2088
|
+
}
|
|
2089
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2090
|
+
const steps = total / roundingUnit;
|
|
2091
|
+
const roundedSteps = mode === "up" ? Math.ceil(steps) : mode === "down" ? Math.floor(steps) : Math.round(steps);
|
|
2092
|
+
const roundedTotal = round22(roundedSteps * roundingUnit);
|
|
2093
|
+
return {
|
|
2094
|
+
total: round22(total),
|
|
2095
|
+
roundingUnit,
|
|
2096
|
+
mode,
|
|
2097
|
+
roundedTotal,
|
|
2098
|
+
adjustment: round22(roundedTotal - total)
|
|
2099
|
+
};
|
|
2100
|
+
}
|
|
2101
|
+
function calculateMovingAverages(values, windowSize) {
|
|
2102
|
+
if (!Array.isArray(values) || values.length === 0 || !values.every((v) => typeof v === "number" && Number.isFinite(v))) {
|
|
2103
|
+
return { error: "values must be a non-empty array of finite numbers" };
|
|
2104
|
+
}
|
|
2105
|
+
if (!Number.isInteger(windowSize) || windowSize < 1) {
|
|
2106
|
+
return { error: "windowSize must be a positive integer" };
|
|
2107
|
+
}
|
|
2108
|
+
if (windowSize > values.length) {
|
|
2109
|
+
return { error: "windowSize must be less than or equal to the number of values" };
|
|
2110
|
+
}
|
|
2111
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
2112
|
+
const multiplier = 2 / (windowSize + 1);
|
|
2113
|
+
const points = [];
|
|
2114
|
+
let emaPrev = null;
|
|
2115
|
+
for (let i = 0; i < values.length; i++) {
|
|
2116
|
+
let sma = null;
|
|
2117
|
+
if (i >= windowSize - 1) {
|
|
2118
|
+
let sum = 0;
|
|
2119
|
+
for (let j = i - windowSize + 1; j <= i; j++) sum += values[j];
|
|
2120
|
+
sma = round4(sum / windowSize);
|
|
2121
|
+
}
|
|
2122
|
+
let ema = null;
|
|
2123
|
+
if (i === windowSize - 1) {
|
|
2124
|
+
ema = sma;
|
|
2125
|
+
emaPrev = ema;
|
|
2126
|
+
} else if (i > windowSize - 1 && emaPrev !== null) {
|
|
2127
|
+
ema = round4(values[i] * multiplier + emaPrev * (1 - multiplier));
|
|
2128
|
+
emaPrev = ema;
|
|
2129
|
+
}
|
|
2130
|
+
points.push({ index: i, value: values[i], sma, ema });
|
|
2131
|
+
}
|
|
2132
|
+
const last = points[points.length - 1];
|
|
2133
|
+
return {
|
|
2134
|
+
windowSize,
|
|
2135
|
+
multiplier: round4(multiplier),
|
|
2136
|
+
points,
|
|
2137
|
+
latestSma: last.sma,
|
|
2138
|
+
latestEma: last.ema
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2079
2141
|
|
|
2080
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
|
2142
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, 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 };
|
|
@@ -396,6 +396,36 @@ interface YamlAnchorResolveError {
|
|
|
396
396
|
* syntax remaining.
|
|
397
397
|
*/
|
|
398
398
|
declare function resolveYamlAnchors(yamlText: string): YamlAnchorResolveResult | YamlAnchorResolveError;
|
|
399
|
+
interface MarkdownTaskListItem {
|
|
400
|
+
text: string;
|
|
401
|
+
checked: boolean;
|
|
402
|
+
indent: number;
|
|
403
|
+
section: string;
|
|
404
|
+
}
|
|
405
|
+
interface MarkdownTaskListSectionSummary {
|
|
406
|
+
section: string;
|
|
407
|
+
total: number;
|
|
408
|
+
completed: number;
|
|
409
|
+
percentComplete: number;
|
|
410
|
+
}
|
|
411
|
+
interface MarkdownTaskListProgressResult {
|
|
412
|
+
totalItems: number;
|
|
413
|
+
completedItems: number;
|
|
414
|
+
percentComplete: number;
|
|
415
|
+
sections: MarkdownTaskListSectionSummary[];
|
|
416
|
+
items: MarkdownTaskListItem[];
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Parse a Markdown document's `- [ ]`/`- [x]` task list checkboxes and
|
|
420
|
+
* report completion overall and per section, where a section is the
|
|
421
|
+
* nearest preceding ATX heading (any level) — items before the first
|
|
422
|
+
* heading are grouped under "(no heading)". A real progress-tracking step
|
|
423
|
+
* for README-driven project plans and PR checklists; pure text parsing,
|
|
424
|
+
* no rendering or link resolution.
|
|
425
|
+
*/
|
|
426
|
+
declare function calculateMarkdownTaskListProgress(markdown: string): MarkdownTaskListProgressResult | {
|
|
427
|
+
error: string;
|
|
428
|
+
};
|
|
399
429
|
|
|
400
430
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
401
431
|
type data_CsvDuplicateGroup = CsvDuplicateGroup;
|
|
@@ -411,6 +441,9 @@ type data_EnvParseResult = EnvParseResult;
|
|
|
411
441
|
type data_FrontMatterError = FrontMatterError;
|
|
412
442
|
type data_FrontMatterResult = FrontMatterResult;
|
|
413
443
|
type data_IniSection = IniSection;
|
|
444
|
+
type data_MarkdownTaskListItem = MarkdownTaskListItem;
|
|
445
|
+
type data_MarkdownTaskListProgressResult = MarkdownTaskListProgressResult;
|
|
446
|
+
type data_MarkdownTaskListSectionSummary = MarkdownTaskListSectionSummary;
|
|
414
447
|
type data_MarkdownTocEntry = MarkdownTocEntry;
|
|
415
448
|
type data_MarkdownTocOptions = MarkdownTocOptions;
|
|
416
449
|
type data_MarkdownTocResult = MarkdownTocResult;
|
|
@@ -428,6 +461,7 @@ type data_XmlToJsonOptions = XmlToJsonOptions;
|
|
|
428
461
|
type data_YamlAnchorInfo = YamlAnchorInfo;
|
|
429
462
|
type data_YamlAnchorResolveError = YamlAnchorResolveError;
|
|
430
463
|
type data_YamlAnchorResolveResult = YamlAnchorResolveResult;
|
|
464
|
+
declare const data_calculateMarkdownTaskListProgress: typeof calculateMarkdownTaskListProgress;
|
|
431
465
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
432
466
|
declare const data_csvToJson: typeof csvToJson;
|
|
433
467
|
declare const data_csvToSqlInsert: typeof csvToSqlInsert;
|
|
@@ -477,7 +511,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
477
511
|
declare const data_validateYaml: typeof validateYaml;
|
|
478
512
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
479
513
|
declare namespace data {
|
|
480
|
-
export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
514
|
+
export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
481
515
|
}
|
|
482
516
|
|
|
483
|
-
export {
|
|
517
|
+
export { getXmlStats as $, csvToSqlInsert as A, detectDelimiter as B, type ConvertedSubtitles as C, detectSubtitleFormat as D, type EnvDiffError as E, type FrontMatterError as F, diffEnvExample as G, envToExport as H, type IniSection as I, envToJson as J, findCsvDuplicateRows as K, formatNdjson as L, type MarkdownTaskListItem as M, type NdjsonLineResult as N, formatSubtitleTimestamp as O, type ParseOptions as P, formatToml as Q, formatXml as R, type SubtitleCue as S, type TomlFormatResult as T, generateMarkdownToc as U, type ValidationResult as V, getSection as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, getSectionNames as Z, getTomlStats as _, type CsvDuplicateGroup as a, getYamlStats as a0, iniToJson as a1, jsonArrayToNdjson as a2, jsonToIni as a3, jsonToToml as a4, jsonToXml as a5, minifyNdjson as a6, minifyToml as a7, minifyXml as a8, ndjsonToJsonArray as a9, parseCsv as aa, parseEnv as ab, parseFrontMatter as ac, parseIni as ad, parseSubtitleTimestamp as ae, parseSubtitles as af, parseXmlToObject as ag, resolveYamlAnchors as ah, serializeSubtitles as ai, shiftSubtitles as aj, stringifyIni as ak, toCsvString as al, tomlToJson as am, validateEnvKey as an, validateIni as ao, validateNdjson as ap, validateToml as aq, validateXml as ar, validateYaml as as, xmlToJson as at, type CsvDuplicateOptions as b, type CsvDuplicateResult as c, data as d, type CsvParseResult as e, type CsvToSqlOptions as f, type CsvToSqlResult as g, type EnvDiffResult as h, type EnvEntry as i, type EnvParseResult as j, type FrontMatterResult as k, type MarkdownTaskListProgressResult as l, type MarkdownTaskListSectionSummary as m, type MarkdownTocEntry as n, type MarkdownTocOptions as o, type MarkdownTocResult as p, type NdjsonValidateResult as q, type ParsedIni as r, type ParsedSubtitles as s, type SubtitleFormat as t, type XmlToJsonOptions as u, type YamlAnchorResolveError as v, type YamlAnchorResolveResult as w, calculateMarkdownTaskListProgress as x, convertSubtitles as y, csvToJson as z };
|
|
@@ -396,6 +396,36 @@ interface YamlAnchorResolveError {
|
|
|
396
396
|
* syntax remaining.
|
|
397
397
|
*/
|
|
398
398
|
declare function resolveYamlAnchors(yamlText: string): YamlAnchorResolveResult | YamlAnchorResolveError;
|
|
399
|
+
interface MarkdownTaskListItem {
|
|
400
|
+
text: string;
|
|
401
|
+
checked: boolean;
|
|
402
|
+
indent: number;
|
|
403
|
+
section: string;
|
|
404
|
+
}
|
|
405
|
+
interface MarkdownTaskListSectionSummary {
|
|
406
|
+
section: string;
|
|
407
|
+
total: number;
|
|
408
|
+
completed: number;
|
|
409
|
+
percentComplete: number;
|
|
410
|
+
}
|
|
411
|
+
interface MarkdownTaskListProgressResult {
|
|
412
|
+
totalItems: number;
|
|
413
|
+
completedItems: number;
|
|
414
|
+
percentComplete: number;
|
|
415
|
+
sections: MarkdownTaskListSectionSummary[];
|
|
416
|
+
items: MarkdownTaskListItem[];
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Parse a Markdown document's `- [ ]`/`- [x]` task list checkboxes and
|
|
420
|
+
* report completion overall and per section, where a section is the
|
|
421
|
+
* nearest preceding ATX heading (any level) — items before the first
|
|
422
|
+
* heading are grouped under "(no heading)". A real progress-tracking step
|
|
423
|
+
* for README-driven project plans and PR checklists; pure text parsing,
|
|
424
|
+
* no rendering or link resolution.
|
|
425
|
+
*/
|
|
426
|
+
declare function calculateMarkdownTaskListProgress(markdown: string): MarkdownTaskListProgressResult | {
|
|
427
|
+
error: string;
|
|
428
|
+
};
|
|
399
429
|
|
|
400
430
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
401
431
|
type data_CsvDuplicateGroup = CsvDuplicateGroup;
|
|
@@ -411,6 +441,9 @@ type data_EnvParseResult = EnvParseResult;
|
|
|
411
441
|
type data_FrontMatterError = FrontMatterError;
|
|
412
442
|
type data_FrontMatterResult = FrontMatterResult;
|
|
413
443
|
type data_IniSection = IniSection;
|
|
444
|
+
type data_MarkdownTaskListItem = MarkdownTaskListItem;
|
|
445
|
+
type data_MarkdownTaskListProgressResult = MarkdownTaskListProgressResult;
|
|
446
|
+
type data_MarkdownTaskListSectionSummary = MarkdownTaskListSectionSummary;
|
|
414
447
|
type data_MarkdownTocEntry = MarkdownTocEntry;
|
|
415
448
|
type data_MarkdownTocOptions = MarkdownTocOptions;
|
|
416
449
|
type data_MarkdownTocResult = MarkdownTocResult;
|
|
@@ -428,6 +461,7 @@ type data_XmlToJsonOptions = XmlToJsonOptions;
|
|
|
428
461
|
type data_YamlAnchorInfo = YamlAnchorInfo;
|
|
429
462
|
type data_YamlAnchorResolveError = YamlAnchorResolveError;
|
|
430
463
|
type data_YamlAnchorResolveResult = YamlAnchorResolveResult;
|
|
464
|
+
declare const data_calculateMarkdownTaskListProgress: typeof calculateMarkdownTaskListProgress;
|
|
431
465
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
432
466
|
declare const data_csvToJson: typeof csvToJson;
|
|
433
467
|
declare const data_csvToSqlInsert: typeof csvToSqlInsert;
|
|
@@ -477,7 +511,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
477
511
|
declare const data_validateYaml: typeof validateYaml;
|
|
478
512
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
479
513
|
declare namespace data {
|
|
480
|
-
export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
514
|
+
export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
481
515
|
}
|
|
482
516
|
|
|
483
|
-
export {
|
|
517
|
+
export { getXmlStats as $, csvToSqlInsert as A, detectDelimiter as B, type ConvertedSubtitles as C, detectSubtitleFormat as D, type EnvDiffError as E, type FrontMatterError as F, diffEnvExample as G, envToExport as H, type IniSection as I, envToJson as J, findCsvDuplicateRows as K, formatNdjson as L, type MarkdownTaskListItem as M, type NdjsonLineResult as N, formatSubtitleTimestamp as O, type ParseOptions as P, formatToml as Q, formatXml as R, type SubtitleCue as S, type TomlFormatResult as T, generateMarkdownToc as U, type ValidationResult as V, getSection as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, getSectionNames as Z, getTomlStats as _, type CsvDuplicateGroup as a, getYamlStats as a0, iniToJson as a1, jsonArrayToNdjson as a2, jsonToIni as a3, jsonToToml as a4, jsonToXml as a5, minifyNdjson as a6, minifyToml as a7, minifyXml as a8, ndjsonToJsonArray as a9, parseCsv as aa, parseEnv as ab, parseFrontMatter as ac, parseIni as ad, parseSubtitleTimestamp as ae, parseSubtitles as af, parseXmlToObject as ag, resolveYamlAnchors as ah, serializeSubtitles as ai, shiftSubtitles as aj, stringifyIni as ak, toCsvString as al, tomlToJson as am, validateEnvKey as an, validateIni as ao, validateNdjson as ap, validateToml as aq, validateXml as ar, validateYaml as as, xmlToJson as at, type CsvDuplicateOptions as b, type CsvDuplicateResult as c, data as d, type CsvParseResult as e, type CsvToSqlOptions as f, type CsvToSqlResult as g, type EnvDiffResult as h, type EnvEntry as i, type EnvParseResult as j, type FrontMatterResult as k, type MarkdownTaskListProgressResult as l, type MarkdownTaskListSectionSummary as m, type MarkdownTocEntry as n, type MarkdownTocOptions as o, type MarkdownTocResult as p, type NdjsonValidateResult as q, type ParsedIni as r, type ParsedSubtitles as s, type SubtitleFormat as t, type XmlToJsonOptions as u, type YamlAnchorResolveError as v, type YamlAnchorResolveResult as w, calculateMarkdownTaskListProgress as x, convertSubtitles as y, csvToJson as z };
|
package/dist/index.cjs
CHANGED
|
@@ -5151,6 +5151,7 @@ function getEmojiCategories() {
|
|
|
5151
5151
|
// src/tools/data.ts
|
|
5152
5152
|
var data_exports = {};
|
|
5153
5153
|
__export(data_exports, {
|
|
5154
|
+
calculateMarkdownTaskListProgress: () => calculateMarkdownTaskListProgress,
|
|
5154
5155
|
convertSubtitles: () => convertSubtitles,
|
|
5155
5156
|
csvToJson: () => csvToJson2,
|
|
5156
5157
|
csvToSqlInsert: () => csvToSqlInsert,
|
|
@@ -6769,6 +6770,54 @@ function resolveYamlAnchors(yamlText) {
|
|
|
6769
6770
|
const unusedAnchors = seenAnchorNames.filter((name) => !referencedNames.has(name));
|
|
6770
6771
|
return { resolvedYaml, anchors, unusedAnchors, aliasCount };
|
|
6771
6772
|
}
|
|
6773
|
+
function calculateMarkdownTaskListProgress(markdown) {
|
|
6774
|
+
if (typeof markdown !== "string") return { error: "markdown must be a string" };
|
|
6775
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
6776
|
+
const headingRe = /^(#{1,6})\s+(.*)$/;
|
|
6777
|
+
const itemRe = /^(\s*)[-*+]\s+\[([ xX])\]\s+(.*)$/;
|
|
6778
|
+
let currentSection = "(no heading)";
|
|
6779
|
+
const items = [];
|
|
6780
|
+
for (const line of markdown.replace(/\r\n/g, "\n").split("\n")) {
|
|
6781
|
+
const headingMatch = line.match(headingRe);
|
|
6782
|
+
if (headingMatch) {
|
|
6783
|
+
currentSection = headingMatch[2].trim();
|
|
6784
|
+
continue;
|
|
6785
|
+
}
|
|
6786
|
+
const itemMatch = line.match(itemRe);
|
|
6787
|
+
if (itemMatch) {
|
|
6788
|
+
items.push({
|
|
6789
|
+
text: itemMatch[3].trim(),
|
|
6790
|
+
checked: itemMatch[2].toLowerCase() === "x",
|
|
6791
|
+
indent: itemMatch[1].length,
|
|
6792
|
+
section: currentSection
|
|
6793
|
+
});
|
|
6794
|
+
}
|
|
6795
|
+
}
|
|
6796
|
+
const totalItems = items.length;
|
|
6797
|
+
const completedItems = items.filter((i) => i.checked).length;
|
|
6798
|
+
const percentComplete = totalItems === 0 ? 0 : round23(completedItems / totalItems * 100);
|
|
6799
|
+
const sectionOrder = [];
|
|
6800
|
+
const sectionTotals = /* @__PURE__ */ new Map();
|
|
6801
|
+
for (const item of items) {
|
|
6802
|
+
if (!sectionTotals.has(item.section)) {
|
|
6803
|
+
sectionTotals.set(item.section, { total: 0, completed: 0 });
|
|
6804
|
+
sectionOrder.push(item.section);
|
|
6805
|
+
}
|
|
6806
|
+
const s = sectionTotals.get(item.section);
|
|
6807
|
+
s.total++;
|
|
6808
|
+
if (item.checked) s.completed++;
|
|
6809
|
+
}
|
|
6810
|
+
const sections = sectionOrder.map((section) => {
|
|
6811
|
+
const s = sectionTotals.get(section);
|
|
6812
|
+
return {
|
|
6813
|
+
section,
|
|
6814
|
+
total: s.total,
|
|
6815
|
+
completed: s.completed,
|
|
6816
|
+
percentComplete: s.total === 0 ? 0 : round23(s.completed / s.total * 100)
|
|
6817
|
+
};
|
|
6818
|
+
});
|
|
6819
|
+
return { totalItems, completedItems, percentComplete, sections, items };
|
|
6820
|
+
}
|
|
6772
6821
|
|
|
6773
6822
|
// src/tools/generators.ts
|
|
6774
6823
|
var generators_exports = {};
|
|
@@ -8188,6 +8237,7 @@ __export(units_exports, {
|
|
|
8188
8237
|
calcSubnet: () => calcSubnet,
|
|
8189
8238
|
calculateBreakEven: () => calculateBreakEven,
|
|
8190
8239
|
calculateCashBreakdown: () => calculateCashBreakdown,
|
|
8240
|
+
calculateCashRounding: () => calculateCashRounding,
|
|
8191
8241
|
calculateCdMaturity: () => calculateCdMaturity,
|
|
8192
8242
|
calculateChange: () => calculateChange,
|
|
8193
8243
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
@@ -8196,6 +8246,7 @@ __export(units_exports, {
|
|
|
8196
8246
|
calculateEmi: () => calculateEmi,
|
|
8197
8247
|
calculateLoan: () => calculateLoan,
|
|
8198
8248
|
calculateMarginMarkup: () => calculateMarginMarkup,
|
|
8249
|
+
calculateMovingAverages: () => calculateMovingAverages,
|
|
8199
8250
|
calculatePaybackPeriod: () => calculatePaybackPeriod,
|
|
8200
8251
|
calculatePercentageChange: () => calculatePercentageChange,
|
|
8201
8252
|
calculateRoi: () => calculateRoi,
|
|
@@ -10242,6 +10293,66 @@ function calculateDepreciationSchedule(cost, salvageValue, usefulLifeYears, meth
|
|
|
10242
10293
|
schedule
|
|
10243
10294
|
};
|
|
10244
10295
|
}
|
|
10296
|
+
function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
10297
|
+
if (!Number.isFinite(total)) return { error: "total must be a finite number" };
|
|
10298
|
+
if (!Number.isFinite(roundingUnit) || roundingUnit <= 0) {
|
|
10299
|
+
return { error: "roundingUnit must be a finite number greater than zero" };
|
|
10300
|
+
}
|
|
10301
|
+
if (mode !== "nearest" && mode !== "up" && mode !== "down") {
|
|
10302
|
+
return { error: 'mode must be one of: "nearest", "up", "down"' };
|
|
10303
|
+
}
|
|
10304
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10305
|
+
const steps = total / roundingUnit;
|
|
10306
|
+
const roundedSteps = mode === "up" ? Math.ceil(steps) : mode === "down" ? Math.floor(steps) : Math.round(steps);
|
|
10307
|
+
const roundedTotal = round23(roundedSteps * roundingUnit);
|
|
10308
|
+
return {
|
|
10309
|
+
total: round23(total),
|
|
10310
|
+
roundingUnit,
|
|
10311
|
+
mode,
|
|
10312
|
+
roundedTotal,
|
|
10313
|
+
adjustment: round23(roundedTotal - total)
|
|
10314
|
+
};
|
|
10315
|
+
}
|
|
10316
|
+
function calculateMovingAverages(values, windowSize) {
|
|
10317
|
+
if (!Array.isArray(values) || values.length === 0 || !values.every((v) => typeof v === "number" && Number.isFinite(v))) {
|
|
10318
|
+
return { error: "values must be a non-empty array of finite numbers" };
|
|
10319
|
+
}
|
|
10320
|
+
if (!Number.isInteger(windowSize) || windowSize < 1) {
|
|
10321
|
+
return { error: "windowSize must be a positive integer" };
|
|
10322
|
+
}
|
|
10323
|
+
if (windowSize > values.length) {
|
|
10324
|
+
return { error: "windowSize must be less than or equal to the number of values" };
|
|
10325
|
+
}
|
|
10326
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
10327
|
+
const multiplier = 2 / (windowSize + 1);
|
|
10328
|
+
const points = [];
|
|
10329
|
+
let emaPrev = null;
|
|
10330
|
+
for (let i = 0; i < values.length; i++) {
|
|
10331
|
+
let sma = null;
|
|
10332
|
+
if (i >= windowSize - 1) {
|
|
10333
|
+
let sum = 0;
|
|
10334
|
+
for (let j = i - windowSize + 1; j <= i; j++) sum += values[j];
|
|
10335
|
+
sma = round4(sum / windowSize);
|
|
10336
|
+
}
|
|
10337
|
+
let ema = null;
|
|
10338
|
+
if (i === windowSize - 1) {
|
|
10339
|
+
ema = sma;
|
|
10340
|
+
emaPrev = ema;
|
|
10341
|
+
} else if (i > windowSize - 1 && emaPrev !== null) {
|
|
10342
|
+
ema = round4(values[i] * multiplier + emaPrev * (1 - multiplier));
|
|
10343
|
+
emaPrev = ema;
|
|
10344
|
+
}
|
|
10345
|
+
points.push({ index: i, value: values[i], sma, ema });
|
|
10346
|
+
}
|
|
10347
|
+
const last = points[points.length - 1];
|
|
10348
|
+
return {
|
|
10349
|
+
windowSize,
|
|
10350
|
+
multiplier: round4(multiplier),
|
|
10351
|
+
points,
|
|
10352
|
+
latestSma: last.sma,
|
|
10353
|
+
latestEma: last.ema
|
|
10354
|
+
};
|
|
10355
|
+
}
|
|
10245
10356
|
|
|
10246
10357
|
// src/tools/network.ts
|
|
10247
10358
|
var network_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -2,10 +2,10 @@ export { j as json } from './json-Ta9JykSB.cjs';
|
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.cjs';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.cjs';
|
|
4
4
|
export { t as text } from './text-DWUcY8H1.cjs';
|
|
5
|
-
export { d as data } from './data-
|
|
5
|
+
export { d as data } from './data-BI_007dA.cjs';
|
|
6
6
|
export { g as generators } from './generators-Du8cBesn.cjs';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.cjs';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-DNz6YS5D.cjs';
|
|
9
9
|
export { n as network } from './network-DelcJeJa.cjs';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.cjs';
|
|
11
11
|
export { c as code } from './code-KXoRsHtl.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ export { j as json } from './json-Ta9JykSB.js';
|
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.js';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.js';
|
|
4
4
|
export { t as text } from './text-DWUcY8H1.js';
|
|
5
|
-
export { d as data } from './data-
|
|
5
|
+
export { d as data } from './data-BI_007dA.js';
|
|
6
6
|
export { g as generators } from './generators-Du8cBesn.js';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.js';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-DNz6YS5D.js';
|
|
9
9
|
export { n as network } from './network-DelcJeJa.js';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.js';
|
|
11
11
|
export { c as code } from './code-KXoRsHtl.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { media_exports as media } from './chunk-226EH3ZI.js';
|
|
2
|
-
export { units_exports as units } from './chunk-
|
|
2
|
+
export { units_exports as units } from './chunk-MDREETCH.js';
|
|
3
3
|
export { network_exports as network } from './chunk-Y7YY733Z.js';
|
|
4
4
|
export { api_exports as api } from './chunk-52ZDKSIX.js';
|
|
5
5
|
export { code_exports as code } from './chunk-JL7YTXRB.js';
|
|
@@ -11,7 +11,7 @@ export { json_exports as json } from './chunk-WVEKRKGU.js';
|
|
|
11
11
|
export { encoding_exports as encoding } from './chunk-DOWQZUTP.js';
|
|
12
12
|
export { hashing_exports as hashing } from './chunk-PET2CGTH.js';
|
|
13
13
|
export { text_exports as text } from './chunk-P7TXG7CI.js';
|
|
14
|
-
export { data_exports as data } from './chunk-
|
|
14
|
+
export { data_exports as data } from './chunk-BDQXYFTO.js';
|
|
15
15
|
export { generators_exports as generators } from './chunk-3TYWIX3B.js';
|
|
16
16
|
export { time_exports as time } from './chunk-IEPWZERQ.js';
|
|
17
17
|
import './chunk-MLKGABMK.js';
|
package/dist/tools/data.cjs
CHANGED
|
@@ -1593,7 +1593,56 @@ function resolveYamlAnchors(yamlText) {
|
|
|
1593
1593
|
const unusedAnchors = seenAnchorNames.filter((name) => !referencedNames.has(name));
|
|
1594
1594
|
return { resolvedYaml, anchors, unusedAnchors, aliasCount };
|
|
1595
1595
|
}
|
|
1596
|
+
function calculateMarkdownTaskListProgress(markdown) {
|
|
1597
|
+
if (typeof markdown !== "string") return { error: "markdown must be a string" };
|
|
1598
|
+
const round2 = (n) => Math.round(n * 100) / 100;
|
|
1599
|
+
const headingRe = /^(#{1,6})\s+(.*)$/;
|
|
1600
|
+
const itemRe = /^(\s*)[-*+]\s+\[([ xX])\]\s+(.*)$/;
|
|
1601
|
+
let currentSection = "(no heading)";
|
|
1602
|
+
const items = [];
|
|
1603
|
+
for (const line of markdown.replace(/\r\n/g, "\n").split("\n")) {
|
|
1604
|
+
const headingMatch = line.match(headingRe);
|
|
1605
|
+
if (headingMatch) {
|
|
1606
|
+
currentSection = headingMatch[2].trim();
|
|
1607
|
+
continue;
|
|
1608
|
+
}
|
|
1609
|
+
const itemMatch = line.match(itemRe);
|
|
1610
|
+
if (itemMatch) {
|
|
1611
|
+
items.push({
|
|
1612
|
+
text: itemMatch[3].trim(),
|
|
1613
|
+
checked: itemMatch[2].toLowerCase() === "x",
|
|
1614
|
+
indent: itemMatch[1].length,
|
|
1615
|
+
section: currentSection
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
const totalItems = items.length;
|
|
1620
|
+
const completedItems = items.filter((i) => i.checked).length;
|
|
1621
|
+
const percentComplete = totalItems === 0 ? 0 : round2(completedItems / totalItems * 100);
|
|
1622
|
+
const sectionOrder = [];
|
|
1623
|
+
const sectionTotals = /* @__PURE__ */ new Map();
|
|
1624
|
+
for (const item of items) {
|
|
1625
|
+
if (!sectionTotals.has(item.section)) {
|
|
1626
|
+
sectionTotals.set(item.section, { total: 0, completed: 0 });
|
|
1627
|
+
sectionOrder.push(item.section);
|
|
1628
|
+
}
|
|
1629
|
+
const s = sectionTotals.get(item.section);
|
|
1630
|
+
s.total++;
|
|
1631
|
+
if (item.checked) s.completed++;
|
|
1632
|
+
}
|
|
1633
|
+
const sections = sectionOrder.map((section) => {
|
|
1634
|
+
const s = sectionTotals.get(section);
|
|
1635
|
+
return {
|
|
1636
|
+
section,
|
|
1637
|
+
total: s.total,
|
|
1638
|
+
completed: s.completed,
|
|
1639
|
+
percentComplete: s.total === 0 ? 0 : round2(s.completed / s.total * 100)
|
|
1640
|
+
};
|
|
1641
|
+
});
|
|
1642
|
+
return { totalItems, completedItems, percentComplete, sections, items };
|
|
1643
|
+
}
|
|
1596
1644
|
|
|
1645
|
+
exports.calculateMarkdownTaskListProgress = calculateMarkdownTaskListProgress;
|
|
1597
1646
|
exports.convertSubtitles = convertSubtitles;
|
|
1598
1647
|
exports.csvToJson = csvToJson;
|
|
1599
1648
|
exports.csvToSqlInsert = csvToSqlInsert;
|
package/dist/tools/data.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as ConvertedSubtitles, a as CsvDuplicateGroup, b as CsvDuplicateOptions, c as CsvDuplicateResult, e as CsvParseResult, f as CsvToSqlOptions, g as CsvToSqlResult, E as EnvDiffError, h as EnvDiffResult, i as EnvEntry, j as EnvParseResult, F as FrontMatterError, k as FrontMatterResult, I as IniSection, M as
|
|
1
|
+
export { C as ConvertedSubtitles, a as CsvDuplicateGroup, b as CsvDuplicateOptions, c as CsvDuplicateResult, e as CsvParseResult, f as CsvToSqlOptions, g as CsvToSqlResult, E as EnvDiffError, h as EnvDiffResult, i as EnvEntry, j as EnvParseResult, F as FrontMatterError, k as FrontMatterResult, I as IniSection, M as MarkdownTaskListItem, l as MarkdownTaskListProgressResult, m as MarkdownTaskListSectionSummary, n as MarkdownTocEntry, o as MarkdownTocOptions, p as MarkdownTocResult, N as NdjsonLineResult, q as NdjsonValidateResult, P as ParseOptions, r as ParsedIni, s as ParsedSubtitles, S as SubtitleCue, t as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, u as XmlToJsonOptions, Y as YamlAnchorInfo, v as YamlAnchorResolveError, w as YamlAnchorResolveResult, x as calculateMarkdownTaskListProgress, y as convertSubtitles, z as csvToJson, A as csvToSqlInsert, B as detectDelimiter, D as detectSubtitleFormat, G as diffEnvExample, H as envToExport, J as envToJson, K as findCsvDuplicateRows, L as formatNdjson, O as formatSubtitleTimestamp, Q as formatToml, R as formatXml, U as generateMarkdownToc, W as getSection, Z as getSectionNames, _ as getTomlStats, $ as getXmlStats, a0 as getYamlStats, a1 as iniToJson, a2 as jsonArrayToNdjson, a3 as jsonToIni, a4 as jsonToToml, a5 as jsonToXml, a6 as minifyNdjson, a7 as minifyToml, a8 as minifyXml, a9 as ndjsonToJsonArray, aa as parseCsv, ab as parseEnv, ac as parseFrontMatter, ad as parseIni, ae as parseSubtitleTimestamp, af as parseSubtitles, ag as parseXmlToObject, ah as resolveYamlAnchors, ai as serializeSubtitles, aj as shiftSubtitles, ak as stringifyIni, al as toCsvString, am as tomlToJson, an as validateEnvKey, ao as validateIni, ap as validateNdjson, aq as validateToml, ar as validateXml, as as validateYaml, at as xmlToJson } from '../data-BI_007dA.cjs';
|
package/dist/tools/data.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as ConvertedSubtitles, a as CsvDuplicateGroup, b as CsvDuplicateOptions, c as CsvDuplicateResult, e as CsvParseResult, f as CsvToSqlOptions, g as CsvToSqlResult, E as EnvDiffError, h as EnvDiffResult, i as EnvEntry, j as EnvParseResult, F as FrontMatterError, k as FrontMatterResult, I as IniSection, M as
|
|
1
|
+
export { C as ConvertedSubtitles, a as CsvDuplicateGroup, b as CsvDuplicateOptions, c as CsvDuplicateResult, e as CsvParseResult, f as CsvToSqlOptions, g as CsvToSqlResult, E as EnvDiffError, h as EnvDiffResult, i as EnvEntry, j as EnvParseResult, F as FrontMatterError, k as FrontMatterResult, I as IniSection, M as MarkdownTaskListItem, l as MarkdownTaskListProgressResult, m as MarkdownTaskListSectionSummary, n as MarkdownTocEntry, o as MarkdownTocOptions, p as MarkdownTocResult, N as NdjsonLineResult, q as NdjsonValidateResult, P as ParseOptions, r as ParsedIni, s as ParsedSubtitles, S as SubtitleCue, t as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, u as XmlToJsonOptions, Y as YamlAnchorInfo, v as YamlAnchorResolveError, w as YamlAnchorResolveResult, x as calculateMarkdownTaskListProgress, y as convertSubtitles, z as csvToJson, A as csvToSqlInsert, B as detectDelimiter, D as detectSubtitleFormat, G as diffEnvExample, H as envToExport, J as envToJson, K as findCsvDuplicateRows, L as formatNdjson, O as formatSubtitleTimestamp, Q as formatToml, R as formatXml, U as generateMarkdownToc, W as getSection, Z as getSectionNames, _ as getTomlStats, $ as getXmlStats, a0 as getYamlStats, a1 as iniToJson, a2 as jsonArrayToNdjson, a3 as jsonToIni, a4 as jsonToToml, a5 as jsonToXml, a6 as minifyNdjson, a7 as minifyToml, a8 as minifyXml, a9 as ndjsonToJsonArray, aa as parseCsv, ab as parseEnv, ac as parseFrontMatter, ad as parseIni, ae as parseSubtitleTimestamp, af as parseSubtitles, ag as parseXmlToObject, ah as resolveYamlAnchors, ai as serializeSubtitles, aj as shiftSubtitles, ak as stringifyIni, al as toCsvString, am as tomlToJson, an as validateEnvKey, ao as validateIni, ap as validateNdjson, aq as validateToml, ar as validateXml, as as validateYaml, at as xmlToJson } from '../data-BI_007dA.js';
|
package/dist/tools/data.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { convertSubtitles, csvToJson, csvToSqlInsert, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson } from '../chunk-
|
|
1
|
+
export { calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson } from '../chunk-BDQXYFTO.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -1983,6 +1983,66 @@ function calculateDepreciationSchedule(cost, salvageValue, usefulLifeYears, meth
|
|
|
1983
1983
|
schedule
|
|
1984
1984
|
};
|
|
1985
1985
|
}
|
|
1986
|
+
function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
1987
|
+
if (!Number.isFinite(total)) return { error: "total must be a finite number" };
|
|
1988
|
+
if (!Number.isFinite(roundingUnit) || roundingUnit <= 0) {
|
|
1989
|
+
return { error: "roundingUnit must be a finite number greater than zero" };
|
|
1990
|
+
}
|
|
1991
|
+
if (mode !== "nearest" && mode !== "up" && mode !== "down") {
|
|
1992
|
+
return { error: 'mode must be one of: "nearest", "up", "down"' };
|
|
1993
|
+
}
|
|
1994
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
1995
|
+
const steps = total / roundingUnit;
|
|
1996
|
+
const roundedSteps = mode === "up" ? Math.ceil(steps) : mode === "down" ? Math.floor(steps) : Math.round(steps);
|
|
1997
|
+
const roundedTotal = round22(roundedSteps * roundingUnit);
|
|
1998
|
+
return {
|
|
1999
|
+
total: round22(total),
|
|
2000
|
+
roundingUnit,
|
|
2001
|
+
mode,
|
|
2002
|
+
roundedTotal,
|
|
2003
|
+
adjustment: round22(roundedTotal - total)
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
function calculateMovingAverages(values, windowSize) {
|
|
2007
|
+
if (!Array.isArray(values) || values.length === 0 || !values.every((v) => typeof v === "number" && Number.isFinite(v))) {
|
|
2008
|
+
return { error: "values must be a non-empty array of finite numbers" };
|
|
2009
|
+
}
|
|
2010
|
+
if (!Number.isInteger(windowSize) || windowSize < 1) {
|
|
2011
|
+
return { error: "windowSize must be a positive integer" };
|
|
2012
|
+
}
|
|
2013
|
+
if (windowSize > values.length) {
|
|
2014
|
+
return { error: "windowSize must be less than or equal to the number of values" };
|
|
2015
|
+
}
|
|
2016
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
2017
|
+
const multiplier = 2 / (windowSize + 1);
|
|
2018
|
+
const points = [];
|
|
2019
|
+
let emaPrev = null;
|
|
2020
|
+
for (let i = 0; i < values.length; i++) {
|
|
2021
|
+
let sma = null;
|
|
2022
|
+
if (i >= windowSize - 1) {
|
|
2023
|
+
let sum = 0;
|
|
2024
|
+
for (let j = i - windowSize + 1; j <= i; j++) sum += values[j];
|
|
2025
|
+
sma = round4(sum / windowSize);
|
|
2026
|
+
}
|
|
2027
|
+
let ema = null;
|
|
2028
|
+
if (i === windowSize - 1) {
|
|
2029
|
+
ema = sma;
|
|
2030
|
+
emaPrev = ema;
|
|
2031
|
+
} else if (i > windowSize - 1 && emaPrev !== null) {
|
|
2032
|
+
ema = round4(values[i] * multiplier + emaPrev * (1 - multiplier));
|
|
2033
|
+
emaPrev = ema;
|
|
2034
|
+
}
|
|
2035
|
+
points.push({ index: i, value: values[i], sma, ema });
|
|
2036
|
+
}
|
|
2037
|
+
const last = points[points.length - 1];
|
|
2038
|
+
return {
|
|
2039
|
+
windowSize,
|
|
2040
|
+
multiplier: round4(multiplier),
|
|
2041
|
+
points,
|
|
2042
|
+
latestSma: last.sma,
|
|
2043
|
+
latestEma: last.ema
|
|
2044
|
+
};
|
|
2045
|
+
}
|
|
1986
2046
|
|
|
1987
2047
|
exports.BASE_LABELS = BASE_LABELS;
|
|
1988
2048
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -2003,6 +2063,7 @@ exports.calcAspectRatio = calcAspectRatio;
|
|
|
2003
2063
|
exports.calcSubnet = calcSubnet;
|
|
2004
2064
|
exports.calculateBreakEven = calculateBreakEven;
|
|
2005
2065
|
exports.calculateCashBreakdown = calculateCashBreakdown;
|
|
2066
|
+
exports.calculateCashRounding = calculateCashRounding;
|
|
2006
2067
|
exports.calculateCdMaturity = calculateCdMaturity;
|
|
2007
2068
|
exports.calculateChange = calculateChange;
|
|
2008
2069
|
exports.calculateCompoundInterest = calculateCompoundInterest;
|
|
@@ -2011,6 +2072,7 @@ exports.calculateDiscount = calculateDiscount;
|
|
|
2011
2072
|
exports.calculateEmi = calculateEmi;
|
|
2012
2073
|
exports.calculateLoan = calculateLoan;
|
|
2013
2074
|
exports.calculateMarginMarkup = calculateMarginMarkup;
|
|
2075
|
+
exports.calculateMovingAverages = calculateMovingAverages;
|
|
2014
2076
|
exports.calculatePaybackPeriod = calculatePaybackPeriod;
|
|
2015
2077
|
exports.calculatePercentageChange = calculatePercentageChange;
|
|
2016
2078
|
exports.calculateRoi = calculateRoi;
|
package/dist/tools/units.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CashBreakdownResult, w as CashChangeResult, x as CashDenominationItem, y as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CashBreakdownResult, w as CashChangeResult, x as CashDenominationItem, y as CashRoundingMode, z as CashRoundingResult, D as CdMaturityResult, E as CompareUnitPricesResult, F as CompoundInterestResult, G as CompoundYearRow, H as DepreciationMethod, I as DepreciationResult, J as DepreciationYear, K as Dimensions, L as DiscountField, M as DiscountInput, N as DiscountResult, O as EmiResult, P as EmiTenureUnit, Q as EmiYearlyBreakdownRow, R as FilePermissions, S as FormatOptions, T as IbanValidationResult, U as IpConversion, V as IsbnFormat, W as IsbnResult, X as LoanResult, Y as MarginMarkupField, Z as MarginMarkupInput, _ as MarginMarkupResult, $ as MovingAveragePoint, a0 as MovingAverageResult, a1 as NotationStyle, a2 as NumberBase, a3 as PaybackPeriodInput, a4 as PaybackPeriodResult, a5 as PercentChangeDirection, a6 as PercentageChangeResult, a7 as Permission, a8 as PxConvertResult, a9 as RoiInput, aa as RoiResult, ab as RuleOf72Direction, ac as RuleOf72Result, ad as SavingsGoalInput, ae as SavingsGoalMode, af as SavingsGoalResult, ag as SemverVersion, ah as SimpleInterestResult, ai as SubnetInfo, aj as SuccessiveDiscountResult, ak as SuccessiveDiscountStep, al as TaxDirection, am as TaxResult, an as TimeValueDirection, ao as TimeValueResult, ap as TipSplitResult, aq as USD_DENOMINATIONS, ar as UnitPriceItem, as as UnitPriceResult, at as VideoBitrateInput, au as VideoBitrateMode, av as VideoBitrateResult, aw as ViewportConvertResult, ax as applySuccessiveDiscounts, ay as autoFormat, az as bumpVersion, aA as calcAspectRatio, aB as calcSubnet, aC as calculateBreakEven, aD as calculateCashBreakdown, aE as calculateCashRounding, aF as calculateCdMaturity, aG as calculateChange, aH as calculateCompoundInterest, aI as calculateDepreciationSchedule, aJ as calculateDiscount, aK as calculateEmi, aL as calculateLoan, aM as calculateMarginMarkup, aN as calculateMovingAverages, aO as calculatePaybackPeriod, aP as calculatePercentageChange, aQ as calculateRoi, aR as calculateRuleOf72, aS as calculateSavingsGoal, aT as calculateSimpleInterest, aU as calculateTax, aV as calculateTimeValue, aW as calculateTipSplit, aX as calculateVideoBitrate, aY as compareSemver, aZ as compareUnitPrices, a_ as convert, a$ as convertAprApy, b0 as convertBytes, b1 as convertIp, b2 as coverBox, b3 as decimalToIp, b4 as decimalToIpCidr, b5 as describePermissions, b6 as fitIntoBox, b7 as formatNumber, b8 as formatValue, b9 as formatVwValue, ba as formatWithSeparator, bb as gcd, bc as ipFromBinary, bd as ipFromDecimal, be as ipFromHex, bf as ipToBinary, bg as ipToDecimal, bh as ipToDecimalCidr, bi as ipToHex, bj as ipToOctal, bk as isValid, bl as isValidCidr, bm as isValidIp, bn as isValidIpv4, bo as marginToMarkup, bp as markupToMargin, bq as octalToPermissions, br as parseFileSize, bs as parseInput, bt as parseNumberString, bu as parseSemver, bv as permissionsToChmod, bw as permissionsToOctal, bx as permissionsToSymbolic, by as ptToPx, bz as pxToAll, bA as pxToViewport, bB as remToPx, bC as satisfiesRange, bD as scaleByHeight, bE as scaleByWidth, bF as sortVersions, bG as splitSubnet, bH as symbolicToPermissions, bI as validateBarcode, bJ as validateCardNumber, bK as validateIban, bL as validateIsbn, bM as viewportToPx } from '../units-DNz6YS5D.cjs';
|
package/dist/tools/units.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CashBreakdownResult, w as CashChangeResult, x as CashDenominationItem, y as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CashBreakdownResult, w as CashChangeResult, x as CashDenominationItem, y as CashRoundingMode, z as CashRoundingResult, D as CdMaturityResult, E as CompareUnitPricesResult, F as CompoundInterestResult, G as CompoundYearRow, H as DepreciationMethod, I as DepreciationResult, J as DepreciationYear, K as Dimensions, L as DiscountField, M as DiscountInput, N as DiscountResult, O as EmiResult, P as EmiTenureUnit, Q as EmiYearlyBreakdownRow, R as FilePermissions, S as FormatOptions, T as IbanValidationResult, U as IpConversion, V as IsbnFormat, W as IsbnResult, X as LoanResult, Y as MarginMarkupField, Z as MarginMarkupInput, _ as MarginMarkupResult, $ as MovingAveragePoint, a0 as MovingAverageResult, a1 as NotationStyle, a2 as NumberBase, a3 as PaybackPeriodInput, a4 as PaybackPeriodResult, a5 as PercentChangeDirection, a6 as PercentageChangeResult, a7 as Permission, a8 as PxConvertResult, a9 as RoiInput, aa as RoiResult, ab as RuleOf72Direction, ac as RuleOf72Result, ad as SavingsGoalInput, ae as SavingsGoalMode, af as SavingsGoalResult, ag as SemverVersion, ah as SimpleInterestResult, ai as SubnetInfo, aj as SuccessiveDiscountResult, ak as SuccessiveDiscountStep, al as TaxDirection, am as TaxResult, an as TimeValueDirection, ao as TimeValueResult, ap as TipSplitResult, aq as USD_DENOMINATIONS, ar as UnitPriceItem, as as UnitPriceResult, at as VideoBitrateInput, au as VideoBitrateMode, av as VideoBitrateResult, aw as ViewportConvertResult, ax as applySuccessiveDiscounts, ay as autoFormat, az as bumpVersion, aA as calcAspectRatio, aB as calcSubnet, aC as calculateBreakEven, aD as calculateCashBreakdown, aE as calculateCashRounding, aF as calculateCdMaturity, aG as calculateChange, aH as calculateCompoundInterest, aI as calculateDepreciationSchedule, aJ as calculateDiscount, aK as calculateEmi, aL as calculateLoan, aM as calculateMarginMarkup, aN as calculateMovingAverages, aO as calculatePaybackPeriod, aP as calculatePercentageChange, aQ as calculateRoi, aR as calculateRuleOf72, aS as calculateSavingsGoal, aT as calculateSimpleInterest, aU as calculateTax, aV as calculateTimeValue, aW as calculateTipSplit, aX as calculateVideoBitrate, aY as compareSemver, aZ as compareUnitPrices, a_ as convert, a$ as convertAprApy, b0 as convertBytes, b1 as convertIp, b2 as coverBox, b3 as decimalToIp, b4 as decimalToIpCidr, b5 as describePermissions, b6 as fitIntoBox, b7 as formatNumber, b8 as formatValue, b9 as formatVwValue, ba as formatWithSeparator, bb as gcd, bc as ipFromBinary, bd as ipFromDecimal, be as ipFromHex, bf as ipToBinary, bg as ipToDecimal, bh as ipToDecimalCidr, bi as ipToHex, bj as ipToOctal, bk as isValid, bl as isValidCidr, bm as isValidIp, bn as isValidIpv4, bo as marginToMarkup, bp as markupToMargin, bq as octalToPermissions, br as parseFileSize, bs as parseInput, bt as parseNumberString, bu as parseSemver, bv as permissionsToChmod, bw as permissionsToOctal, bx as permissionsToSymbolic, by as ptToPx, bz as pxToAll, bA as pxToViewport, bB as remToPx, bC as satisfiesRange, bD as scaleByHeight, bE as scaleByWidth, bF as sortVersions, bG as splitSubnet, bH as symbolicToPermissions, bI as validateBarcode, bJ as validateCardNumber, bK as validateIban, bL as validateIsbn, bM as viewportToPx } from '../units-DNz6YS5D.js';
|
package/dist/tools/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, 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-MDREETCH.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -892,6 +892,50 @@ interface DepreciationResult {
|
|
|
892
892
|
declare function calculateDepreciationSchedule(cost: number, salvageValue: number, usefulLifeYears: number, method: DepreciationMethod): DepreciationResult | {
|
|
893
893
|
error: string;
|
|
894
894
|
};
|
|
895
|
+
type CashRoundingMode = "nearest" | "up" | "down";
|
|
896
|
+
interface CashRoundingResult {
|
|
897
|
+
total: number;
|
|
898
|
+
roundingUnit: number;
|
|
899
|
+
mode: CashRoundingMode;
|
|
900
|
+
roundedTotal: number;
|
|
901
|
+
adjustment: number;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Round a cashless total to the nearest payable cash denomination, the way
|
|
905
|
+
* a till rounds a card-priced total to the nearest 5 cents (or whatever the
|
|
906
|
+
* smallest circulating coin is) when settling in physical cash. This is
|
|
907
|
+
* commonly called "Swedish rounding" or "cash rounding", and is distinct
|
|
908
|
+
* from the Cash Denomination / Till Calculator, which breaks a total into
|
|
909
|
+
* bill/coin counts rather than adjusting the total itself.
|
|
910
|
+
*/
|
|
911
|
+
declare function calculateCashRounding(total: number, roundingUnit: number, mode?: CashRoundingMode): CashRoundingResult | {
|
|
912
|
+
error: string;
|
|
913
|
+
};
|
|
914
|
+
interface MovingAveragePoint {
|
|
915
|
+
index: number;
|
|
916
|
+
value: number;
|
|
917
|
+
sma: number | null;
|
|
918
|
+
ema: number | null;
|
|
919
|
+
}
|
|
920
|
+
interface MovingAverageResult {
|
|
921
|
+
windowSize: number;
|
|
922
|
+
multiplier: number;
|
|
923
|
+
points: MovingAveragePoint[];
|
|
924
|
+
latestSma: number | null;
|
|
925
|
+
latestEma: number | null;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Compute simple moving average (SMA) and exponential moving average (EMA)
|
|
929
|
+
* series over a list of numbers using the given window size. SMA at index
|
|
930
|
+
* i is the plain average of the trailing `windowSize` values (null until
|
|
931
|
+
* enough values have accumulated). EMA is seeded with the first SMA value,
|
|
932
|
+
* then updated with the standard smoothing multiplier 2/(windowSize+1). A
|
|
933
|
+
* foundational technical-indicator building block for price/volume series,
|
|
934
|
+
* with no live market-data feed involved.
|
|
935
|
+
*/
|
|
936
|
+
declare function calculateMovingAverages(values: number[], windowSize: number): MovingAverageResult | {
|
|
937
|
+
error: string;
|
|
938
|
+
};
|
|
895
939
|
|
|
896
940
|
type units_AmortizationRow = AmortizationRow;
|
|
897
941
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -919,6 +963,8 @@ type units_CardValidationResult = CardValidationResult;
|
|
|
919
963
|
type units_CashBreakdownResult = CashBreakdownResult;
|
|
920
964
|
type units_CashChangeResult = CashChangeResult;
|
|
921
965
|
type units_CashDenominationItem = CashDenominationItem;
|
|
966
|
+
type units_CashRoundingMode = CashRoundingMode;
|
|
967
|
+
type units_CashRoundingResult = CashRoundingResult;
|
|
922
968
|
type units_CdMaturityResult = CdMaturityResult;
|
|
923
969
|
type units_CompareUnitPricesResult = CompareUnitPricesResult;
|
|
924
970
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
@@ -943,6 +989,8 @@ type units_LoanResult = LoanResult;
|
|
|
943
989
|
type units_MarginMarkupField = MarginMarkupField;
|
|
944
990
|
type units_MarginMarkupInput = MarginMarkupInput;
|
|
945
991
|
type units_MarginMarkupResult = MarginMarkupResult;
|
|
992
|
+
type units_MovingAveragePoint = MovingAveragePoint;
|
|
993
|
+
type units_MovingAverageResult = MovingAverageResult;
|
|
946
994
|
type units_NotationStyle = NotationStyle;
|
|
947
995
|
type units_NumberBase = NumberBase;
|
|
948
996
|
type units_PaybackPeriodInput = PaybackPeriodInput;
|
|
@@ -982,6 +1030,7 @@ declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
|
982
1030
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
983
1031
|
declare const units_calculateBreakEven: typeof calculateBreakEven;
|
|
984
1032
|
declare const units_calculateCashBreakdown: typeof calculateCashBreakdown;
|
|
1033
|
+
declare const units_calculateCashRounding: typeof calculateCashRounding;
|
|
985
1034
|
declare const units_calculateCdMaturity: typeof calculateCdMaturity;
|
|
986
1035
|
declare const units_calculateChange: typeof calculateChange;
|
|
987
1036
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
@@ -990,6 +1039,7 @@ declare const units_calculateDiscount: typeof calculateDiscount;
|
|
|
990
1039
|
declare const units_calculateEmi: typeof calculateEmi;
|
|
991
1040
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
992
1041
|
declare const units_calculateMarginMarkup: typeof calculateMarginMarkup;
|
|
1042
|
+
declare const units_calculateMovingAverages: typeof calculateMovingAverages;
|
|
993
1043
|
declare const units_calculatePaybackPeriod: typeof calculatePaybackPeriod;
|
|
994
1044
|
declare const units_calculatePercentageChange: typeof calculatePercentageChange;
|
|
995
1045
|
declare const units_calculateRoi: typeof calculateRoi;
|
|
@@ -1054,7 +1104,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1054
1104
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1055
1105
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1056
1106
|
declare namespace units {
|
|
1057
|
-
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1107
|
+
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_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_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_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 };
|
|
1058
1108
|
}
|
|
1059
1109
|
|
|
1060
|
-
export { type
|
|
1110
|
+
export { type MovingAveragePoint as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CdMaturityResult as D, type CompareUnitPricesResult as E, type CompoundInterestResult as F, type CompoundYearRow as G, type DepreciationMethod as H, type DepreciationResult as I, type DepreciationYear as J, type Dimensions as K, type DiscountField as L, type DiscountInput as M, type DiscountResult as N, type EmiResult as O, type EmiTenureUnit as P, type EmiYearlyBreakdownRow as Q, type FilePermissions as R, type FormatOptions as S, type IbanValidationResult as T, type IpConversion as U, type IsbnFormat as V, type IsbnResult as W, type LoanResult as X, type MarginMarkupField as Y, type MarginMarkupInput as Z, type MarginMarkupResult as _, type AprApyDirection as a, convertAprApy as a$, type MovingAverageResult as a0, type NotationStyle as a1, type NumberBase as a2, type PaybackPeriodInput as a3, type PaybackPeriodResult as a4, type PercentChangeDirection as a5, type PercentageChangeResult as a6, type Permission as a7, type PxConvertResult as a8, type RoiInput as a9, calcAspectRatio as aA, calcSubnet as aB, calculateBreakEven as aC, calculateCashBreakdown as aD, calculateCashRounding as aE, calculateCdMaturity as aF, calculateChange as aG, calculateCompoundInterest as aH, calculateDepreciationSchedule as aI, calculateDiscount as aJ, calculateEmi as aK, calculateLoan as aL, calculateMarginMarkup as aM, calculateMovingAverages as aN, calculatePaybackPeriod as aO, calculatePercentageChange as aP, calculateRoi as aQ, calculateRuleOf72 as aR, calculateSavingsGoal as aS, calculateSimpleInterest as aT, calculateTax as aU, calculateTimeValue as aV, calculateTipSplit as aW, calculateVideoBitrate as aX, compareSemver as aY, compareUnitPrices as aZ, convert as a_, type RoiResult as aa, type RuleOf72Direction as ab, type RuleOf72Result as ac, type SavingsGoalInput as ad, type SavingsGoalMode as ae, type SavingsGoalResult as af, type SemverVersion as ag, type SimpleInterestResult as ah, type SubnetInfo as ai, type SuccessiveDiscountResult as aj, type SuccessiveDiscountStep as ak, type TaxDirection as al, type TaxResult as am, type TimeValueDirection as an, type TimeValueResult as ao, type TipSplitResult as ap, USD_DENOMINATIONS as aq, type UnitPriceItem as ar, type UnitPriceResult as as, type VideoBitrateInput as at, type VideoBitrateMode as au, type VideoBitrateResult as av, type ViewportConvertResult as aw, applySuccessiveDiscounts as ax, autoFormat as ay, bumpVersion as az, type AprApyResult as b, convertBytes as b0, convertIp as b1, coverBox as b2, decimalToIp as b3, decimalToIpCidr as b4, describePermissions as b5, fitIntoBox as b6, formatNumber as b7, formatValue as b8, formatVwValue as b9, pxToViewport as bA, remToPx as bB, satisfiesRange as bC, scaleByHeight as bD, scaleByWidth as bE, sortVersions as bF, splitSubnet as bG, symbolicToPermissions as bH, validateBarcode as bI, validateCardNumber as bJ, validateIban as bK, validateIsbn as bL, viewportToPx as bM, formatWithSeparator as ba, gcd as bb, ipFromBinary as bc, ipFromDecimal as bd, ipFromHex as be, ipToBinary as bf, ipToDecimal as bg, ipToDecimalCidr as bh, ipToHex as bi, ipToOctal as bj, isValid as bk, isValidCidr as bl, isValidIp as bm, isValidIpv4 as bn, marginToMarkup as bo, markupToMargin as bp, octalToPermissions as bq, parseFileSize as br, parseInput as bs, parseNumberString as bt, parseSemver as bu, permissionsToChmod as bv, permissionsToOctal as bw, permissionsToSymbolic as bx, ptToPx as by, pxToAll as bz, type AspectRatioResult as c, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BreakEvenInput as i, type BreakEvenResult as j, type ByteConvertResult as k, type ByteUnit as l, COMMON_LOCALES as m, COMMON_PERMISSIONS as n, COMMON_RATIOS as o, COMMON_SIZES as p, COMMON_TAX_RATES as q, COMMON_TIP_PERCENTAGES as r, COMMON_VIEWPORTS as s, type CardValidationResult as t, units as u, type CashBreakdownResult as v, type CashChangeResult as w, type CashDenominationItem as x, type CashRoundingMode as y, type CashRoundingResult as z };
|
|
@@ -892,6 +892,50 @@ interface DepreciationResult {
|
|
|
892
892
|
declare function calculateDepreciationSchedule(cost: number, salvageValue: number, usefulLifeYears: number, method: DepreciationMethod): DepreciationResult | {
|
|
893
893
|
error: string;
|
|
894
894
|
};
|
|
895
|
+
type CashRoundingMode = "nearest" | "up" | "down";
|
|
896
|
+
interface CashRoundingResult {
|
|
897
|
+
total: number;
|
|
898
|
+
roundingUnit: number;
|
|
899
|
+
mode: CashRoundingMode;
|
|
900
|
+
roundedTotal: number;
|
|
901
|
+
adjustment: number;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Round a cashless total to the nearest payable cash denomination, the way
|
|
905
|
+
* a till rounds a card-priced total to the nearest 5 cents (or whatever the
|
|
906
|
+
* smallest circulating coin is) when settling in physical cash. This is
|
|
907
|
+
* commonly called "Swedish rounding" or "cash rounding", and is distinct
|
|
908
|
+
* from the Cash Denomination / Till Calculator, which breaks a total into
|
|
909
|
+
* bill/coin counts rather than adjusting the total itself.
|
|
910
|
+
*/
|
|
911
|
+
declare function calculateCashRounding(total: number, roundingUnit: number, mode?: CashRoundingMode): CashRoundingResult | {
|
|
912
|
+
error: string;
|
|
913
|
+
};
|
|
914
|
+
interface MovingAveragePoint {
|
|
915
|
+
index: number;
|
|
916
|
+
value: number;
|
|
917
|
+
sma: number | null;
|
|
918
|
+
ema: number | null;
|
|
919
|
+
}
|
|
920
|
+
interface MovingAverageResult {
|
|
921
|
+
windowSize: number;
|
|
922
|
+
multiplier: number;
|
|
923
|
+
points: MovingAveragePoint[];
|
|
924
|
+
latestSma: number | null;
|
|
925
|
+
latestEma: number | null;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Compute simple moving average (SMA) and exponential moving average (EMA)
|
|
929
|
+
* series over a list of numbers using the given window size. SMA at index
|
|
930
|
+
* i is the plain average of the trailing `windowSize` values (null until
|
|
931
|
+
* enough values have accumulated). EMA is seeded with the first SMA value,
|
|
932
|
+
* then updated with the standard smoothing multiplier 2/(windowSize+1). A
|
|
933
|
+
* foundational technical-indicator building block for price/volume series,
|
|
934
|
+
* with no live market-data feed involved.
|
|
935
|
+
*/
|
|
936
|
+
declare function calculateMovingAverages(values: number[], windowSize: number): MovingAverageResult | {
|
|
937
|
+
error: string;
|
|
938
|
+
};
|
|
895
939
|
|
|
896
940
|
type units_AmortizationRow = AmortizationRow;
|
|
897
941
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -919,6 +963,8 @@ type units_CardValidationResult = CardValidationResult;
|
|
|
919
963
|
type units_CashBreakdownResult = CashBreakdownResult;
|
|
920
964
|
type units_CashChangeResult = CashChangeResult;
|
|
921
965
|
type units_CashDenominationItem = CashDenominationItem;
|
|
966
|
+
type units_CashRoundingMode = CashRoundingMode;
|
|
967
|
+
type units_CashRoundingResult = CashRoundingResult;
|
|
922
968
|
type units_CdMaturityResult = CdMaturityResult;
|
|
923
969
|
type units_CompareUnitPricesResult = CompareUnitPricesResult;
|
|
924
970
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
@@ -943,6 +989,8 @@ type units_LoanResult = LoanResult;
|
|
|
943
989
|
type units_MarginMarkupField = MarginMarkupField;
|
|
944
990
|
type units_MarginMarkupInput = MarginMarkupInput;
|
|
945
991
|
type units_MarginMarkupResult = MarginMarkupResult;
|
|
992
|
+
type units_MovingAveragePoint = MovingAveragePoint;
|
|
993
|
+
type units_MovingAverageResult = MovingAverageResult;
|
|
946
994
|
type units_NotationStyle = NotationStyle;
|
|
947
995
|
type units_NumberBase = NumberBase;
|
|
948
996
|
type units_PaybackPeriodInput = PaybackPeriodInput;
|
|
@@ -982,6 +1030,7 @@ declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
|
982
1030
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
983
1031
|
declare const units_calculateBreakEven: typeof calculateBreakEven;
|
|
984
1032
|
declare const units_calculateCashBreakdown: typeof calculateCashBreakdown;
|
|
1033
|
+
declare const units_calculateCashRounding: typeof calculateCashRounding;
|
|
985
1034
|
declare const units_calculateCdMaturity: typeof calculateCdMaturity;
|
|
986
1035
|
declare const units_calculateChange: typeof calculateChange;
|
|
987
1036
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
@@ -990,6 +1039,7 @@ declare const units_calculateDiscount: typeof calculateDiscount;
|
|
|
990
1039
|
declare const units_calculateEmi: typeof calculateEmi;
|
|
991
1040
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
992
1041
|
declare const units_calculateMarginMarkup: typeof calculateMarginMarkup;
|
|
1042
|
+
declare const units_calculateMovingAverages: typeof calculateMovingAverages;
|
|
993
1043
|
declare const units_calculatePaybackPeriod: typeof calculatePaybackPeriod;
|
|
994
1044
|
declare const units_calculatePercentageChange: typeof calculatePercentageChange;
|
|
995
1045
|
declare const units_calculateRoi: typeof calculateRoi;
|
|
@@ -1054,7 +1104,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1054
1104
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1055
1105
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1056
1106
|
declare namespace units {
|
|
1057
|
-
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1107
|
+
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_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_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_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 };
|
|
1058
1108
|
}
|
|
1059
1109
|
|
|
1060
|
-
export { type
|
|
1110
|
+
export { type MovingAveragePoint as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CdMaturityResult as D, type CompareUnitPricesResult as E, type CompoundInterestResult as F, type CompoundYearRow as G, type DepreciationMethod as H, type DepreciationResult as I, type DepreciationYear as J, type Dimensions as K, type DiscountField as L, type DiscountInput as M, type DiscountResult as N, type EmiResult as O, type EmiTenureUnit as P, type EmiYearlyBreakdownRow as Q, type FilePermissions as R, type FormatOptions as S, type IbanValidationResult as T, type IpConversion as U, type IsbnFormat as V, type IsbnResult as W, type LoanResult as X, type MarginMarkupField as Y, type MarginMarkupInput as Z, type MarginMarkupResult as _, type AprApyDirection as a, convertAprApy as a$, type MovingAverageResult as a0, type NotationStyle as a1, type NumberBase as a2, type PaybackPeriodInput as a3, type PaybackPeriodResult as a4, type PercentChangeDirection as a5, type PercentageChangeResult as a6, type Permission as a7, type PxConvertResult as a8, type RoiInput as a9, calcAspectRatio as aA, calcSubnet as aB, calculateBreakEven as aC, calculateCashBreakdown as aD, calculateCashRounding as aE, calculateCdMaturity as aF, calculateChange as aG, calculateCompoundInterest as aH, calculateDepreciationSchedule as aI, calculateDiscount as aJ, calculateEmi as aK, calculateLoan as aL, calculateMarginMarkup as aM, calculateMovingAverages as aN, calculatePaybackPeriod as aO, calculatePercentageChange as aP, calculateRoi as aQ, calculateRuleOf72 as aR, calculateSavingsGoal as aS, calculateSimpleInterest as aT, calculateTax as aU, calculateTimeValue as aV, calculateTipSplit as aW, calculateVideoBitrate as aX, compareSemver as aY, compareUnitPrices as aZ, convert as a_, type RoiResult as aa, type RuleOf72Direction as ab, type RuleOf72Result as ac, type SavingsGoalInput as ad, type SavingsGoalMode as ae, type SavingsGoalResult as af, type SemverVersion as ag, type SimpleInterestResult as ah, type SubnetInfo as ai, type SuccessiveDiscountResult as aj, type SuccessiveDiscountStep as ak, type TaxDirection as al, type TaxResult as am, type TimeValueDirection as an, type TimeValueResult as ao, type TipSplitResult as ap, USD_DENOMINATIONS as aq, type UnitPriceItem as ar, type UnitPriceResult as as, type VideoBitrateInput as at, type VideoBitrateMode as au, type VideoBitrateResult as av, type ViewportConvertResult as aw, applySuccessiveDiscounts as ax, autoFormat as ay, bumpVersion as az, type AprApyResult as b, convertBytes as b0, convertIp as b1, coverBox as b2, decimalToIp as b3, decimalToIpCidr as b4, describePermissions as b5, fitIntoBox as b6, formatNumber as b7, formatValue as b8, formatVwValue as b9, pxToViewport as bA, remToPx as bB, satisfiesRange as bC, scaleByHeight as bD, scaleByWidth as bE, sortVersions as bF, splitSubnet as bG, symbolicToPermissions as bH, validateBarcode as bI, validateCardNumber as bJ, validateIban as bK, validateIsbn as bL, viewportToPx as bM, formatWithSeparator as ba, gcd as bb, ipFromBinary as bc, ipFromDecimal as bd, ipFromHex as be, ipToBinary as bf, ipToDecimal as bg, ipToDecimalCidr as bh, ipToHex as bi, ipToOctal as bj, isValid as bk, isValidCidr as bl, isValidIp as bm, isValidIpv4 as bn, marginToMarkup as bo, markupToMargin as bp, octalToPermissions as bq, parseFileSize as br, parseInput as bs, parseNumberString as bt, parseSemver as bu, permissionsToChmod as bv, permissionsToOctal as bw, permissionsToSymbolic as bx, ptToPx as by, pxToAll as bz, type AspectRatioResult as c, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BreakEvenInput as i, type BreakEvenResult as j, type ByteConvertResult as k, type ByteUnit as l, COMMON_LOCALES as m, COMMON_PERMISSIONS as n, COMMON_RATIOS as o, COMMON_SIZES as p, COMMON_TAX_RATES as q, COMMON_TIP_PERCENTAGES as r, COMMON_VIEWPORTS as s, type CardValidationResult as t, units as u, type CashBreakdownResult as v, type CashChangeResult as w, type CashDenominationItem as x, type CashRoundingMode as y, type CashRoundingResult as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilix-tech/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.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",
|