@utilix-tech/sdk 0.49.0 → 0.51.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-24OT376F.js → chunk-ZZJPD366.js} +94 -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 +142 -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 +93 -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-cVnt1_f6.d.cts → units-y30YVhqI.d.cts} +63 -2
- package/dist/{units-cVnt1_f6.d.ts → units-y30YVhqI.d.ts} +63 -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.51.0
|
|
6
|
+
- Add `calculateGpa` (gpa-calculator): compute a weighted GPA from a list of courses, each with a letter grade and credit hours, using the standard 4.0-capped scale.
|
|
7
|
+
|
|
8
|
+
## 0.50.0
|
|
9
|
+
- Add `calculateMovingAverages` (moving-average-calculator): compute SMA and EMA series from a list of numbers and a window size.
|
|
10
|
+
- Add `calculateMarkdownTaskListProgress` (markdown-task-list-progress): parse a Markdown document's checkbox task list and report completion percentage overall and per section.
|
|
11
|
+
|
|
5
12
|
## 0.49.0
|
|
6
13
|
- Add `calculateCashRounding` (cash-rounding-calculator): round a cashless total to the nearest payable cash denomination ("Swedish rounding"), with round-nearest, round-up, and round-down modes.
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**642 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, calculateCashRounding } 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, calculateGpa } from "@utilix-tech/sdk/units";
|
|
322
326
|
|
|
323
327
|
// File sizes
|
|
324
328
|
convertBytes(1073741824, "GB"); // 1
|
|
@@ -444,6 +448,14 @@ calculateDepreciationSchedule(10000, 1000, 5, "straight-line");
|
|
|
444
448
|
// Round a cashless total to the nearest payable cash denomination ("Swedish rounding")
|
|
445
449
|
calculateCashRounding(2.02, 0.05);
|
|
446
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: [...] }
|
|
455
|
+
|
|
456
|
+
// Weighted GPA from a list of courses (letter grade + credit hours)
|
|
457
|
+
calculateGpa([{ name: "Calculus", grade: "A", credits: 4 }, { name: "History", grade: "B+", credits: 3 }]);
|
|
458
|
+
// { gpa: 3.7, totalCredits: 7, totalQualityPoints: 25.9, courses: [...] }
|
|
447
459
|
```
|
|
448
460
|
|
|
449
461
|
---
|
|
@@ -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 };
|
|
@@ -14,6 +14,7 @@ __export(units_exports, {
|
|
|
14
14
|
COMMON_TAX_RATES: () => COMMON_TAX_RATES,
|
|
15
15
|
COMMON_TIP_PERCENTAGES: () => COMMON_TIP_PERCENTAGES,
|
|
16
16
|
COMMON_VIEWPORTS: () => COMMON_VIEWPORTS,
|
|
17
|
+
GPA_GRADE_POINTS: () => GPA_GRADE_POINTS,
|
|
17
18
|
USD_DENOMINATIONS: () => USD_DENOMINATIONS,
|
|
18
19
|
applySuccessiveDiscounts: () => applySuccessiveDiscounts,
|
|
19
20
|
autoFormat: () => autoFormat,
|
|
@@ -29,8 +30,10 @@ __export(units_exports, {
|
|
|
29
30
|
calculateDepreciationSchedule: () => calculateDepreciationSchedule,
|
|
30
31
|
calculateDiscount: () => calculateDiscount,
|
|
31
32
|
calculateEmi: () => calculateEmi,
|
|
33
|
+
calculateGpa: () => calculateGpa,
|
|
32
34
|
calculateLoan: () => calculateLoan,
|
|
33
35
|
calculateMarginMarkup: () => calculateMarginMarkup,
|
|
36
|
+
calculateMovingAverages: () => calculateMovingAverages,
|
|
34
37
|
calculatePaybackPeriod: () => calculatePaybackPeriod,
|
|
35
38
|
calculatePercentageChange: () => calculatePercentageChange,
|
|
36
39
|
calculateRoi: () => calculateRoi,
|
|
@@ -2097,5 +2100,95 @@ function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
|
2097
2100
|
adjustment: round22(roundedTotal - total)
|
|
2098
2101
|
};
|
|
2099
2102
|
}
|
|
2103
|
+
function calculateMovingAverages(values, windowSize) {
|
|
2104
|
+
if (!Array.isArray(values) || values.length === 0 || !values.every((v) => typeof v === "number" && Number.isFinite(v))) {
|
|
2105
|
+
return { error: "values must be a non-empty array of finite numbers" };
|
|
2106
|
+
}
|
|
2107
|
+
if (!Number.isInteger(windowSize) || windowSize < 1) {
|
|
2108
|
+
return { error: "windowSize must be a positive integer" };
|
|
2109
|
+
}
|
|
2110
|
+
if (windowSize > values.length) {
|
|
2111
|
+
return { error: "windowSize must be less than or equal to the number of values" };
|
|
2112
|
+
}
|
|
2113
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
2114
|
+
const multiplier = 2 / (windowSize + 1);
|
|
2115
|
+
const points = [];
|
|
2116
|
+
let emaPrev = null;
|
|
2117
|
+
for (let i = 0; i < values.length; i++) {
|
|
2118
|
+
let sma = null;
|
|
2119
|
+
if (i >= windowSize - 1) {
|
|
2120
|
+
let sum = 0;
|
|
2121
|
+
for (let j = i - windowSize + 1; j <= i; j++) sum += values[j];
|
|
2122
|
+
sma = round4(sum / windowSize);
|
|
2123
|
+
}
|
|
2124
|
+
let ema = null;
|
|
2125
|
+
if (i === windowSize - 1) {
|
|
2126
|
+
ema = sma;
|
|
2127
|
+
emaPrev = ema;
|
|
2128
|
+
} else if (i > windowSize - 1 && emaPrev !== null) {
|
|
2129
|
+
ema = round4(values[i] * multiplier + emaPrev * (1 - multiplier));
|
|
2130
|
+
emaPrev = ema;
|
|
2131
|
+
}
|
|
2132
|
+
points.push({ index: i, value: values[i], sma, ema });
|
|
2133
|
+
}
|
|
2134
|
+
const last = points[points.length - 1];
|
|
2135
|
+
return {
|
|
2136
|
+
windowSize,
|
|
2137
|
+
multiplier: round4(multiplier),
|
|
2138
|
+
points,
|
|
2139
|
+
latestSma: last.sma,
|
|
2140
|
+
latestEma: last.ema
|
|
2141
|
+
};
|
|
2142
|
+
}
|
|
2143
|
+
var GPA_GRADE_POINTS = {
|
|
2144
|
+
"A+": 4,
|
|
2145
|
+
A: 4,
|
|
2146
|
+
"A-": 3.7,
|
|
2147
|
+
"B+": 3.3,
|
|
2148
|
+
B: 3,
|
|
2149
|
+
"B-": 2.7,
|
|
2150
|
+
"C+": 2.3,
|
|
2151
|
+
C: 2,
|
|
2152
|
+
"C-": 1.7,
|
|
2153
|
+
"D+": 1.3,
|
|
2154
|
+
D: 1,
|
|
2155
|
+
"D-": 0.7,
|
|
2156
|
+
F: 0
|
|
2157
|
+
};
|
|
2158
|
+
function calculateGpa(courses) {
|
|
2159
|
+
if (!Array.isArray(courses) || courses.length === 0) {
|
|
2160
|
+
return { error: "courses must be a non-empty array" };
|
|
2161
|
+
}
|
|
2162
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2163
|
+
let totalCredits = 0;
|
|
2164
|
+
let totalQualityPoints = 0;
|
|
2165
|
+
const results = [];
|
|
2166
|
+
for (let i = 0; i < courses.length; i++) {
|
|
2167
|
+
const course = courses[i];
|
|
2168
|
+
if (typeof course.credits !== "number" || !Number.isFinite(course.credits) || course.credits <= 0) {
|
|
2169
|
+
return { error: `course ${i + 1}: credits must be a finite number greater than zero` };
|
|
2170
|
+
}
|
|
2171
|
+
const gradeKey = typeof course.grade === "string" ? course.grade.trim().toUpperCase() : "";
|
|
2172
|
+
const points = GPA_GRADE_POINTS[gradeKey];
|
|
2173
|
+
if (points === void 0) {
|
|
2174
|
+
return { error: `course ${i + 1}: unrecognized grade "${course.grade}" (expected one of ${Object.keys(GPA_GRADE_POINTS).join(", ")})` };
|
|
2175
|
+
}
|
|
2176
|
+
const qualityPoints = round22(points * course.credits);
|
|
2177
|
+
totalCredits += course.credits;
|
|
2178
|
+
totalQualityPoints += qualityPoints;
|
|
2179
|
+
results.push({
|
|
2180
|
+
name: course.name?.trim() || `Course ${i + 1}`,
|
|
2181
|
+
grade: gradeKey,
|
|
2182
|
+
credits: course.credits,
|
|
2183
|
+
qualityPoints
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
return {
|
|
2187
|
+
courses: results,
|
|
2188
|
+
totalCredits: round22(totalCredits),
|
|
2189
|
+
totalQualityPoints: round22(totalQualityPoints),
|
|
2190
|
+
gpa: round22(totalQualityPoints / totalCredits)
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2100
2193
|
|
|
2101
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
|
2194
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
|
@@ -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 = {};
|
|
@@ -8180,6 +8229,7 @@ __export(units_exports, {
|
|
|
8180
8229
|
COMMON_TAX_RATES: () => COMMON_TAX_RATES,
|
|
8181
8230
|
COMMON_TIP_PERCENTAGES: () => COMMON_TIP_PERCENTAGES,
|
|
8182
8231
|
COMMON_VIEWPORTS: () => COMMON_VIEWPORTS,
|
|
8232
|
+
GPA_GRADE_POINTS: () => GPA_GRADE_POINTS,
|
|
8183
8233
|
USD_DENOMINATIONS: () => USD_DENOMINATIONS,
|
|
8184
8234
|
applySuccessiveDiscounts: () => applySuccessiveDiscounts,
|
|
8185
8235
|
autoFormat: () => autoFormat,
|
|
@@ -8195,8 +8245,10 @@ __export(units_exports, {
|
|
|
8195
8245
|
calculateDepreciationSchedule: () => calculateDepreciationSchedule,
|
|
8196
8246
|
calculateDiscount: () => calculateDiscount,
|
|
8197
8247
|
calculateEmi: () => calculateEmi,
|
|
8248
|
+
calculateGpa: () => calculateGpa,
|
|
8198
8249
|
calculateLoan: () => calculateLoan,
|
|
8199
8250
|
calculateMarginMarkup: () => calculateMarginMarkup,
|
|
8251
|
+
calculateMovingAverages: () => calculateMovingAverages,
|
|
8200
8252
|
calculatePaybackPeriod: () => calculatePaybackPeriod,
|
|
8201
8253
|
calculatePercentageChange: () => calculatePercentageChange,
|
|
8202
8254
|
calculateRoi: () => calculateRoi,
|
|
@@ -10263,6 +10315,96 @@ function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
|
10263
10315
|
adjustment: round23(roundedTotal - total)
|
|
10264
10316
|
};
|
|
10265
10317
|
}
|
|
10318
|
+
function calculateMovingAverages(values, windowSize) {
|
|
10319
|
+
if (!Array.isArray(values) || values.length === 0 || !values.every((v) => typeof v === "number" && Number.isFinite(v))) {
|
|
10320
|
+
return { error: "values must be a non-empty array of finite numbers" };
|
|
10321
|
+
}
|
|
10322
|
+
if (!Number.isInteger(windowSize) || windowSize < 1) {
|
|
10323
|
+
return { error: "windowSize must be a positive integer" };
|
|
10324
|
+
}
|
|
10325
|
+
if (windowSize > values.length) {
|
|
10326
|
+
return { error: "windowSize must be less than or equal to the number of values" };
|
|
10327
|
+
}
|
|
10328
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
10329
|
+
const multiplier = 2 / (windowSize + 1);
|
|
10330
|
+
const points = [];
|
|
10331
|
+
let emaPrev = null;
|
|
10332
|
+
for (let i = 0; i < values.length; i++) {
|
|
10333
|
+
let sma = null;
|
|
10334
|
+
if (i >= windowSize - 1) {
|
|
10335
|
+
let sum = 0;
|
|
10336
|
+
for (let j = i - windowSize + 1; j <= i; j++) sum += values[j];
|
|
10337
|
+
sma = round4(sum / windowSize);
|
|
10338
|
+
}
|
|
10339
|
+
let ema = null;
|
|
10340
|
+
if (i === windowSize - 1) {
|
|
10341
|
+
ema = sma;
|
|
10342
|
+
emaPrev = ema;
|
|
10343
|
+
} else if (i > windowSize - 1 && emaPrev !== null) {
|
|
10344
|
+
ema = round4(values[i] * multiplier + emaPrev * (1 - multiplier));
|
|
10345
|
+
emaPrev = ema;
|
|
10346
|
+
}
|
|
10347
|
+
points.push({ index: i, value: values[i], sma, ema });
|
|
10348
|
+
}
|
|
10349
|
+
const last = points[points.length - 1];
|
|
10350
|
+
return {
|
|
10351
|
+
windowSize,
|
|
10352
|
+
multiplier: round4(multiplier),
|
|
10353
|
+
points,
|
|
10354
|
+
latestSma: last.sma,
|
|
10355
|
+
latestEma: last.ema
|
|
10356
|
+
};
|
|
10357
|
+
}
|
|
10358
|
+
var GPA_GRADE_POINTS = {
|
|
10359
|
+
"A+": 4,
|
|
10360
|
+
A: 4,
|
|
10361
|
+
"A-": 3.7,
|
|
10362
|
+
"B+": 3.3,
|
|
10363
|
+
B: 3,
|
|
10364
|
+
"B-": 2.7,
|
|
10365
|
+
"C+": 2.3,
|
|
10366
|
+
C: 2,
|
|
10367
|
+
"C-": 1.7,
|
|
10368
|
+
"D+": 1.3,
|
|
10369
|
+
D: 1,
|
|
10370
|
+
"D-": 0.7,
|
|
10371
|
+
F: 0
|
|
10372
|
+
};
|
|
10373
|
+
function calculateGpa(courses) {
|
|
10374
|
+
if (!Array.isArray(courses) || courses.length === 0) {
|
|
10375
|
+
return { error: "courses must be a non-empty array" };
|
|
10376
|
+
}
|
|
10377
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10378
|
+
let totalCredits = 0;
|
|
10379
|
+
let totalQualityPoints = 0;
|
|
10380
|
+
const results = [];
|
|
10381
|
+
for (let i = 0; i < courses.length; i++) {
|
|
10382
|
+
const course = courses[i];
|
|
10383
|
+
if (typeof course.credits !== "number" || !Number.isFinite(course.credits) || course.credits <= 0) {
|
|
10384
|
+
return { error: `course ${i + 1}: credits must be a finite number greater than zero` };
|
|
10385
|
+
}
|
|
10386
|
+
const gradeKey = typeof course.grade === "string" ? course.grade.trim().toUpperCase() : "";
|
|
10387
|
+
const points = GPA_GRADE_POINTS[gradeKey];
|
|
10388
|
+
if (points === void 0) {
|
|
10389
|
+
return { error: `course ${i + 1}: unrecognized grade "${course.grade}" (expected one of ${Object.keys(GPA_GRADE_POINTS).join(", ")})` };
|
|
10390
|
+
}
|
|
10391
|
+
const qualityPoints = round23(points * course.credits);
|
|
10392
|
+
totalCredits += course.credits;
|
|
10393
|
+
totalQualityPoints += qualityPoints;
|
|
10394
|
+
results.push({
|
|
10395
|
+
name: course.name?.trim() || `Course ${i + 1}`,
|
|
10396
|
+
grade: gradeKey,
|
|
10397
|
+
credits: course.credits,
|
|
10398
|
+
qualityPoints
|
|
10399
|
+
});
|
|
10400
|
+
}
|
|
10401
|
+
return {
|
|
10402
|
+
courses: results,
|
|
10403
|
+
totalCredits: round23(totalCredits),
|
|
10404
|
+
totalQualityPoints: round23(totalQualityPoints),
|
|
10405
|
+
gpa: round23(totalQualityPoints / totalCredits)
|
|
10406
|
+
};
|
|
10407
|
+
}
|
|
10266
10408
|
|
|
10267
10409
|
// src/tools/network.ts
|
|
10268
10410
|
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-y30YVhqI.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-y30YVhqI.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-ZZJPD366.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
|
@@ -2003,6 +2003,96 @@ function calculateCashRounding(total, roundingUnit, mode = "nearest") {
|
|
|
2003
2003
|
adjustment: round22(roundedTotal - total)
|
|
2004
2004
|
};
|
|
2005
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
|
+
}
|
|
2046
|
+
var GPA_GRADE_POINTS = {
|
|
2047
|
+
"A+": 4,
|
|
2048
|
+
A: 4,
|
|
2049
|
+
"A-": 3.7,
|
|
2050
|
+
"B+": 3.3,
|
|
2051
|
+
B: 3,
|
|
2052
|
+
"B-": 2.7,
|
|
2053
|
+
"C+": 2.3,
|
|
2054
|
+
C: 2,
|
|
2055
|
+
"C-": 1.7,
|
|
2056
|
+
"D+": 1.3,
|
|
2057
|
+
D: 1,
|
|
2058
|
+
"D-": 0.7,
|
|
2059
|
+
F: 0
|
|
2060
|
+
};
|
|
2061
|
+
function calculateGpa(courses) {
|
|
2062
|
+
if (!Array.isArray(courses) || courses.length === 0) {
|
|
2063
|
+
return { error: "courses must be a non-empty array" };
|
|
2064
|
+
}
|
|
2065
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2066
|
+
let totalCredits = 0;
|
|
2067
|
+
let totalQualityPoints = 0;
|
|
2068
|
+
const results = [];
|
|
2069
|
+
for (let i = 0; i < courses.length; i++) {
|
|
2070
|
+
const course = courses[i];
|
|
2071
|
+
if (typeof course.credits !== "number" || !Number.isFinite(course.credits) || course.credits <= 0) {
|
|
2072
|
+
return { error: `course ${i + 1}: credits must be a finite number greater than zero` };
|
|
2073
|
+
}
|
|
2074
|
+
const gradeKey = typeof course.grade === "string" ? course.grade.trim().toUpperCase() : "";
|
|
2075
|
+
const points = GPA_GRADE_POINTS[gradeKey];
|
|
2076
|
+
if (points === void 0) {
|
|
2077
|
+
return { error: `course ${i + 1}: unrecognized grade "${course.grade}" (expected one of ${Object.keys(GPA_GRADE_POINTS).join(", ")})` };
|
|
2078
|
+
}
|
|
2079
|
+
const qualityPoints = round22(points * course.credits);
|
|
2080
|
+
totalCredits += course.credits;
|
|
2081
|
+
totalQualityPoints += qualityPoints;
|
|
2082
|
+
results.push({
|
|
2083
|
+
name: course.name?.trim() || `Course ${i + 1}`,
|
|
2084
|
+
grade: gradeKey,
|
|
2085
|
+
credits: course.credits,
|
|
2086
|
+
qualityPoints
|
|
2087
|
+
});
|
|
2088
|
+
}
|
|
2089
|
+
return {
|
|
2090
|
+
courses: results,
|
|
2091
|
+
totalCredits: round22(totalCredits),
|
|
2092
|
+
totalQualityPoints: round22(totalQualityPoints),
|
|
2093
|
+
gpa: round22(totalQualityPoints / totalCredits)
|
|
2094
|
+
};
|
|
2095
|
+
}
|
|
2006
2096
|
|
|
2007
2097
|
exports.BASE_LABELS = BASE_LABELS;
|
|
2008
2098
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -2015,6 +2105,7 @@ exports.COMMON_SIZES = COMMON_SIZES;
|
|
|
2015
2105
|
exports.COMMON_TAX_RATES = COMMON_TAX_RATES;
|
|
2016
2106
|
exports.COMMON_TIP_PERCENTAGES = COMMON_TIP_PERCENTAGES;
|
|
2017
2107
|
exports.COMMON_VIEWPORTS = COMMON_VIEWPORTS;
|
|
2108
|
+
exports.GPA_GRADE_POINTS = GPA_GRADE_POINTS;
|
|
2018
2109
|
exports.USD_DENOMINATIONS = USD_DENOMINATIONS;
|
|
2019
2110
|
exports.applySuccessiveDiscounts = applySuccessiveDiscounts;
|
|
2020
2111
|
exports.autoFormat = autoFormat;
|
|
@@ -2030,8 +2121,10 @@ exports.calculateCompoundInterest = calculateCompoundInterest;
|
|
|
2030
2121
|
exports.calculateDepreciationSchedule = calculateDepreciationSchedule;
|
|
2031
2122
|
exports.calculateDiscount = calculateDiscount;
|
|
2032
2123
|
exports.calculateEmi = calculateEmi;
|
|
2124
|
+
exports.calculateGpa = calculateGpa;
|
|
2033
2125
|
exports.calculateLoan = calculateLoan;
|
|
2034
2126
|
exports.calculateMarginMarkup = calculateMarginMarkup;
|
|
2127
|
+
exports.calculateMovingAverages = calculateMovingAverages;
|
|
2035
2128
|
exports.calculatePaybackPeriod = calculatePaybackPeriod;
|
|
2036
2129
|
exports.calculatePercentageChange = calculatePercentageChange;
|
|
2037
2130
|
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 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
|
|
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 GPA_GRADE_POINTS, U as GpaCourse, V as GpaCourseResult, W as GpaResult, X as IbanValidationResult, Y as IpConversion, Z as IsbnFormat, _ as IsbnResult, $ as LoanResult, a0 as MarginMarkupField, a1 as MarginMarkupInput, a2 as MarginMarkupResult, a3 as MovingAveragePoint, a4 as MovingAverageResult, a5 as NotationStyle, a6 as NumberBase, a7 as PaybackPeriodInput, a8 as PaybackPeriodResult, a9 as PercentChangeDirection, aa as PercentageChangeResult, ab as Permission, ac as PxConvertResult, ad as RoiInput, ae as RoiResult, af as RuleOf72Direction, ag as RuleOf72Result, ah as SavingsGoalInput, ai as SavingsGoalMode, aj as SavingsGoalResult, ak as SemverVersion, al as SimpleInterestResult, am as SubnetInfo, an as SuccessiveDiscountResult, ao as SuccessiveDiscountStep, ap as TaxDirection, aq as TaxResult, ar as TimeValueDirection, as as TimeValueResult, at as TipSplitResult, au as USD_DENOMINATIONS, av as UnitPriceItem, aw as UnitPriceResult, ax as VideoBitrateInput, ay as VideoBitrateMode, az as VideoBitrateResult, aA as ViewportConvertResult, aB as applySuccessiveDiscounts, aC as autoFormat, aD as bumpVersion, aE as calcAspectRatio, aF as calcSubnet, aG as calculateBreakEven, aH as calculateCashBreakdown, aI as calculateCashRounding, aJ as calculateCdMaturity, aK as calculateChange, aL as calculateCompoundInterest, aM as calculateDepreciationSchedule, aN as calculateDiscount, aO as calculateEmi, aP as calculateGpa, aQ as calculateLoan, aR as calculateMarginMarkup, aS as calculateMovingAverages, aT as calculatePaybackPeriod, aU as calculatePercentageChange, aV as calculateRoi, aW as calculateRuleOf72, aX as calculateSavingsGoal, aY as calculateSimpleInterest, aZ as calculateTax, a_ as calculateTimeValue, a$ as calculateTipSplit, b0 as calculateVideoBitrate, b1 as compareSemver, b2 as compareUnitPrices, b3 as convert, b4 as convertAprApy, b5 as convertBytes, b6 as convertIp, b7 as coverBox, b8 as decimalToIp, b9 as decimalToIpCidr, ba as describePermissions, bb as fitIntoBox, bc as formatNumber, bd as formatValue, be as formatVwValue, bf as formatWithSeparator, bg as gcd, bh as ipFromBinary, bi as ipFromDecimal, bj as ipFromHex, bk as ipToBinary, bl as ipToDecimal, bm as ipToDecimalCidr, bn as ipToHex, bo as ipToOctal, bp as isValid, bq as isValidCidr, br as isValidIp, bs as isValidIpv4, bt as marginToMarkup, bu as markupToMargin, bv as octalToPermissions, bw as parseFileSize, bx as parseInput, by as parseNumberString, bz as parseSemver, bA as permissionsToChmod, bB as permissionsToOctal, bC as permissionsToSymbolic, bD as ptToPx, bE as pxToAll, bF as pxToViewport, bG as remToPx, bH as satisfiesRange, bI as scaleByHeight, bJ as scaleByWidth, bK as sortVersions, bL as splitSubnet, bM as symbolicToPermissions, bN as validateBarcode, bO as validateCardNumber, bP as validateIban, bQ as validateIsbn, bR as viewportToPx } from '../units-y30YVhqI.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 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
|
|
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 GPA_GRADE_POINTS, U as GpaCourse, V as GpaCourseResult, W as GpaResult, X as IbanValidationResult, Y as IpConversion, Z as IsbnFormat, _ as IsbnResult, $ as LoanResult, a0 as MarginMarkupField, a1 as MarginMarkupInput, a2 as MarginMarkupResult, a3 as MovingAveragePoint, a4 as MovingAverageResult, a5 as NotationStyle, a6 as NumberBase, a7 as PaybackPeriodInput, a8 as PaybackPeriodResult, a9 as PercentChangeDirection, aa as PercentageChangeResult, ab as Permission, ac as PxConvertResult, ad as RoiInput, ae as RoiResult, af as RuleOf72Direction, ag as RuleOf72Result, ah as SavingsGoalInput, ai as SavingsGoalMode, aj as SavingsGoalResult, ak as SemverVersion, al as SimpleInterestResult, am as SubnetInfo, an as SuccessiveDiscountResult, ao as SuccessiveDiscountStep, ap as TaxDirection, aq as TaxResult, ar as TimeValueDirection, as as TimeValueResult, at as TipSplitResult, au as USD_DENOMINATIONS, av as UnitPriceItem, aw as UnitPriceResult, ax as VideoBitrateInput, ay as VideoBitrateMode, az as VideoBitrateResult, aA as ViewportConvertResult, aB as applySuccessiveDiscounts, aC as autoFormat, aD as bumpVersion, aE as calcAspectRatio, aF as calcSubnet, aG as calculateBreakEven, aH as calculateCashBreakdown, aI as calculateCashRounding, aJ as calculateCdMaturity, aK as calculateChange, aL as calculateCompoundInterest, aM as calculateDepreciationSchedule, aN as calculateDiscount, aO as calculateEmi, aP as calculateGpa, aQ as calculateLoan, aR as calculateMarginMarkup, aS as calculateMovingAverages, aT as calculatePaybackPeriod, aU as calculatePercentageChange, aV as calculateRoi, aW as calculateRuleOf72, aX as calculateSavingsGoal, aY as calculateSimpleInterest, aZ as calculateTax, a_ as calculateTimeValue, a$ as calculateTipSplit, b0 as calculateVideoBitrate, b1 as compareSemver, b2 as compareUnitPrices, b3 as convert, b4 as convertAprApy, b5 as convertBytes, b6 as convertIp, b7 as coverBox, b8 as decimalToIp, b9 as decimalToIpCidr, ba as describePermissions, bb as fitIntoBox, bc as formatNumber, bd as formatValue, be as formatVwValue, bf as formatWithSeparator, bg as gcd, bh as ipFromBinary, bi as ipFromDecimal, bj as ipFromHex, bk as ipToBinary, bl as ipToDecimal, bm as ipToDecimalCidr, bn as ipToHex, bo as ipToOctal, bp as isValid, bq as isValidCidr, br as isValidIp, bs as isValidIpv4, bt as marginToMarkup, bu as markupToMargin, bv as octalToPermissions, bw as parseFileSize, bx as parseInput, by as parseNumberString, bz as parseSemver, bA as permissionsToChmod, bB as permissionsToOctal, bC as permissionsToSymbolic, bD as ptToPx, bE as pxToAll, bF as pxToViewport, bG as remToPx, bH as satisfiesRange, bI as scaleByHeight, bJ as scaleByWidth, bK as sortVersions, bL as splitSubnet, bM as symbolicToPermissions, bN as validateBarcode, bO as validateCardNumber, bP as validateIban, bQ as validateIsbn, bR as viewportToPx } from '../units-y30YVhqI.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, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-ZZJPD366.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -911,6 +911,59 @@ interface CashRoundingResult {
|
|
|
911
911
|
declare function calculateCashRounding(total: number, roundingUnit: number, mode?: CashRoundingMode): CashRoundingResult | {
|
|
912
912
|
error: string;
|
|
913
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
|
+
};
|
|
939
|
+
declare const GPA_GRADE_POINTS: Record<string, number>;
|
|
940
|
+
interface GpaCourse {
|
|
941
|
+
name?: string;
|
|
942
|
+
grade: string;
|
|
943
|
+
credits: number;
|
|
944
|
+
}
|
|
945
|
+
interface GpaCourseResult {
|
|
946
|
+
name: string;
|
|
947
|
+
grade: string;
|
|
948
|
+
credits: number;
|
|
949
|
+
qualityPoints: number;
|
|
950
|
+
}
|
|
951
|
+
interface GpaResult {
|
|
952
|
+
courses: GpaCourseResult[];
|
|
953
|
+
totalCredits: number;
|
|
954
|
+
totalQualityPoints: number;
|
|
955
|
+
gpa: number;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Compute a weighted GPA from a list of courses, each with a letter grade
|
|
959
|
+
* and credit hours, using the standard 4.0-capped scale (A+ counts the
|
|
960
|
+
* same as A). GPA is the sum of each course's quality points (grade
|
|
961
|
+
* points times credits) divided by total credits, the same weighted-
|
|
962
|
+
* average calculation any registrar uses.
|
|
963
|
+
*/
|
|
964
|
+
declare function calculateGpa(courses: GpaCourse[]): GpaResult | {
|
|
965
|
+
error: string;
|
|
966
|
+
};
|
|
914
967
|
|
|
915
968
|
type units_AmortizationRow = AmortizationRow;
|
|
916
969
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -956,6 +1009,10 @@ type units_EmiTenureUnit = EmiTenureUnit;
|
|
|
956
1009
|
type units_EmiYearlyBreakdownRow = EmiYearlyBreakdownRow;
|
|
957
1010
|
type units_FilePermissions = FilePermissions;
|
|
958
1011
|
type units_FormatOptions = FormatOptions;
|
|
1012
|
+
declare const units_GPA_GRADE_POINTS: typeof GPA_GRADE_POINTS;
|
|
1013
|
+
type units_GpaCourse = GpaCourse;
|
|
1014
|
+
type units_GpaCourseResult = GpaCourseResult;
|
|
1015
|
+
type units_GpaResult = GpaResult;
|
|
959
1016
|
type units_IbanValidationResult = IbanValidationResult;
|
|
960
1017
|
type units_IpConversion = IpConversion;
|
|
961
1018
|
type units_IsbnFormat = IsbnFormat;
|
|
@@ -964,6 +1021,8 @@ type units_LoanResult = LoanResult;
|
|
|
964
1021
|
type units_MarginMarkupField = MarginMarkupField;
|
|
965
1022
|
type units_MarginMarkupInput = MarginMarkupInput;
|
|
966
1023
|
type units_MarginMarkupResult = MarginMarkupResult;
|
|
1024
|
+
type units_MovingAveragePoint = MovingAveragePoint;
|
|
1025
|
+
type units_MovingAverageResult = MovingAverageResult;
|
|
967
1026
|
type units_NotationStyle = NotationStyle;
|
|
968
1027
|
type units_NumberBase = NumberBase;
|
|
969
1028
|
type units_PaybackPeriodInput = PaybackPeriodInput;
|
|
@@ -1010,8 +1069,10 @@ declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
|
1010
1069
|
declare const units_calculateDepreciationSchedule: typeof calculateDepreciationSchedule;
|
|
1011
1070
|
declare const units_calculateDiscount: typeof calculateDiscount;
|
|
1012
1071
|
declare const units_calculateEmi: typeof calculateEmi;
|
|
1072
|
+
declare const units_calculateGpa: typeof calculateGpa;
|
|
1013
1073
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
1014
1074
|
declare const units_calculateMarginMarkup: typeof calculateMarginMarkup;
|
|
1075
|
+
declare const units_calculateMovingAverages: typeof calculateMovingAverages;
|
|
1015
1076
|
declare const units_calculatePaybackPeriod: typeof calculatePaybackPeriod;
|
|
1016
1077
|
declare const units_calculatePercentageChange: typeof calculatePercentageChange;
|
|
1017
1078
|
declare const units_calculateRoi: typeof calculateRoi;
|
|
@@ -1076,7 +1137,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1076
1137
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1077
1138
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1078
1139
|
declare namespace units {
|
|
1079
|
-
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1140
|
+
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, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_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_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMovingAverages as calculateMovingAverages, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1080
1141
|
}
|
|
1081
1142
|
|
|
1082
|
-
export { type
|
|
1143
|
+
export { type LoanResult 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, GPA_GRADE_POINTS as T, type GpaCourse as U, type GpaCourseResult as V, type GpaResult as W, type IbanValidationResult as X, type IpConversion as Y, type IsbnFormat as Z, type IsbnResult as _, type AprApyDirection as a, calculateTipSplit as a$, type MarginMarkupField as a0, type MarginMarkupInput as a1, type MarginMarkupResult as a2, type MovingAveragePoint as a3, type MovingAverageResult as a4, type NotationStyle as a5, type NumberBase as a6, type PaybackPeriodInput as a7, type PaybackPeriodResult as a8, type PercentChangeDirection as a9, type ViewportConvertResult as aA, applySuccessiveDiscounts as aB, autoFormat as aC, bumpVersion as aD, calcAspectRatio as aE, calcSubnet as aF, calculateBreakEven as aG, calculateCashBreakdown as aH, calculateCashRounding as aI, calculateCdMaturity as aJ, calculateChange as aK, calculateCompoundInterest as aL, calculateDepreciationSchedule as aM, calculateDiscount as aN, calculateEmi as aO, calculateGpa as aP, calculateLoan as aQ, calculateMarginMarkup as aR, calculateMovingAverages as aS, calculatePaybackPeriod as aT, calculatePercentageChange as aU, calculateRoi as aV, calculateRuleOf72 as aW, calculateSavingsGoal as aX, calculateSimpleInterest as aY, calculateTax as aZ, calculateTimeValue as a_, type PercentageChangeResult as aa, type Permission as ab, type PxConvertResult as ac, type RoiInput as ad, type RoiResult as ae, type RuleOf72Direction as af, type RuleOf72Result as ag, type SavingsGoalInput as ah, type SavingsGoalMode as ai, type SavingsGoalResult as aj, type SemverVersion as ak, type SimpleInterestResult as al, type SubnetInfo as am, type SuccessiveDiscountResult as an, type SuccessiveDiscountStep as ao, type TaxDirection as ap, type TaxResult as aq, type TimeValueDirection as ar, type TimeValueResult as as, type TipSplitResult as at, USD_DENOMINATIONS as au, type UnitPriceItem as av, type UnitPriceResult as aw, type VideoBitrateInput as ax, type VideoBitrateMode as ay, type VideoBitrateResult as az, type AprApyResult as b, calculateVideoBitrate as b0, compareSemver as b1, compareUnitPrices as b2, convert as b3, convertAprApy as b4, convertBytes as b5, convertIp as b6, coverBox as b7, decimalToIp as b8, decimalToIpCidr as b9, permissionsToChmod as bA, permissionsToOctal as bB, permissionsToSymbolic as bC, ptToPx as bD, pxToAll as bE, pxToViewport as bF, remToPx as bG, satisfiesRange as bH, scaleByHeight as bI, scaleByWidth as bJ, sortVersions as bK, splitSubnet as bL, symbolicToPermissions as bM, validateBarcode as bN, validateCardNumber as bO, validateIban as bP, validateIsbn as bQ, viewportToPx as bR, describePermissions as ba, fitIntoBox as bb, formatNumber as bc, formatValue as bd, formatVwValue as be, formatWithSeparator as bf, gcd as bg, ipFromBinary as bh, ipFromDecimal as bi, ipFromHex as bj, ipToBinary as bk, ipToDecimal as bl, ipToDecimalCidr as bm, ipToHex as bn, ipToOctal as bo, isValid as bp, isValidCidr as bq, isValidIp as br, isValidIpv4 as bs, marginToMarkup as bt, markupToMargin as bu, octalToPermissions as bv, parseFileSize as bw, parseInput as bx, parseNumberString as by, parseSemver 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 };
|
|
@@ -911,6 +911,59 @@ interface CashRoundingResult {
|
|
|
911
911
|
declare function calculateCashRounding(total: number, roundingUnit: number, mode?: CashRoundingMode): CashRoundingResult | {
|
|
912
912
|
error: string;
|
|
913
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
|
+
};
|
|
939
|
+
declare const GPA_GRADE_POINTS: Record<string, number>;
|
|
940
|
+
interface GpaCourse {
|
|
941
|
+
name?: string;
|
|
942
|
+
grade: string;
|
|
943
|
+
credits: number;
|
|
944
|
+
}
|
|
945
|
+
interface GpaCourseResult {
|
|
946
|
+
name: string;
|
|
947
|
+
grade: string;
|
|
948
|
+
credits: number;
|
|
949
|
+
qualityPoints: number;
|
|
950
|
+
}
|
|
951
|
+
interface GpaResult {
|
|
952
|
+
courses: GpaCourseResult[];
|
|
953
|
+
totalCredits: number;
|
|
954
|
+
totalQualityPoints: number;
|
|
955
|
+
gpa: number;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Compute a weighted GPA from a list of courses, each with a letter grade
|
|
959
|
+
* and credit hours, using the standard 4.0-capped scale (A+ counts the
|
|
960
|
+
* same as A). GPA is the sum of each course's quality points (grade
|
|
961
|
+
* points times credits) divided by total credits, the same weighted-
|
|
962
|
+
* average calculation any registrar uses.
|
|
963
|
+
*/
|
|
964
|
+
declare function calculateGpa(courses: GpaCourse[]): GpaResult | {
|
|
965
|
+
error: string;
|
|
966
|
+
};
|
|
914
967
|
|
|
915
968
|
type units_AmortizationRow = AmortizationRow;
|
|
916
969
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -956,6 +1009,10 @@ type units_EmiTenureUnit = EmiTenureUnit;
|
|
|
956
1009
|
type units_EmiYearlyBreakdownRow = EmiYearlyBreakdownRow;
|
|
957
1010
|
type units_FilePermissions = FilePermissions;
|
|
958
1011
|
type units_FormatOptions = FormatOptions;
|
|
1012
|
+
declare const units_GPA_GRADE_POINTS: typeof GPA_GRADE_POINTS;
|
|
1013
|
+
type units_GpaCourse = GpaCourse;
|
|
1014
|
+
type units_GpaCourseResult = GpaCourseResult;
|
|
1015
|
+
type units_GpaResult = GpaResult;
|
|
959
1016
|
type units_IbanValidationResult = IbanValidationResult;
|
|
960
1017
|
type units_IpConversion = IpConversion;
|
|
961
1018
|
type units_IsbnFormat = IsbnFormat;
|
|
@@ -964,6 +1021,8 @@ type units_LoanResult = LoanResult;
|
|
|
964
1021
|
type units_MarginMarkupField = MarginMarkupField;
|
|
965
1022
|
type units_MarginMarkupInput = MarginMarkupInput;
|
|
966
1023
|
type units_MarginMarkupResult = MarginMarkupResult;
|
|
1024
|
+
type units_MovingAveragePoint = MovingAveragePoint;
|
|
1025
|
+
type units_MovingAverageResult = MovingAverageResult;
|
|
967
1026
|
type units_NotationStyle = NotationStyle;
|
|
968
1027
|
type units_NumberBase = NumberBase;
|
|
969
1028
|
type units_PaybackPeriodInput = PaybackPeriodInput;
|
|
@@ -1010,8 +1069,10 @@ declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
|
1010
1069
|
declare const units_calculateDepreciationSchedule: typeof calculateDepreciationSchedule;
|
|
1011
1070
|
declare const units_calculateDiscount: typeof calculateDiscount;
|
|
1012
1071
|
declare const units_calculateEmi: typeof calculateEmi;
|
|
1072
|
+
declare const units_calculateGpa: typeof calculateGpa;
|
|
1013
1073
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
1014
1074
|
declare const units_calculateMarginMarkup: typeof calculateMarginMarkup;
|
|
1075
|
+
declare const units_calculateMovingAverages: typeof calculateMovingAverages;
|
|
1015
1076
|
declare const units_calculatePaybackPeriod: typeof calculatePaybackPeriod;
|
|
1016
1077
|
declare const units_calculatePercentageChange: typeof calculatePercentageChange;
|
|
1017
1078
|
declare const units_calculateRoi: typeof calculateRoi;
|
|
@@ -1076,7 +1137,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1076
1137
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1077
1138
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1078
1139
|
declare namespace units {
|
|
1079
|
-
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1140
|
+
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, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_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_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMovingAverages as calculateMovingAverages, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
1080
1141
|
}
|
|
1081
1142
|
|
|
1082
|
-
export { type
|
|
1143
|
+
export { type LoanResult 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, GPA_GRADE_POINTS as T, type GpaCourse as U, type GpaCourseResult as V, type GpaResult as W, type IbanValidationResult as X, type IpConversion as Y, type IsbnFormat as Z, type IsbnResult as _, type AprApyDirection as a, calculateTipSplit as a$, type MarginMarkupField as a0, type MarginMarkupInput as a1, type MarginMarkupResult as a2, type MovingAveragePoint as a3, type MovingAverageResult as a4, type NotationStyle as a5, type NumberBase as a6, type PaybackPeriodInput as a7, type PaybackPeriodResult as a8, type PercentChangeDirection as a9, type ViewportConvertResult as aA, applySuccessiveDiscounts as aB, autoFormat as aC, bumpVersion as aD, calcAspectRatio as aE, calcSubnet as aF, calculateBreakEven as aG, calculateCashBreakdown as aH, calculateCashRounding as aI, calculateCdMaturity as aJ, calculateChange as aK, calculateCompoundInterest as aL, calculateDepreciationSchedule as aM, calculateDiscount as aN, calculateEmi as aO, calculateGpa as aP, calculateLoan as aQ, calculateMarginMarkup as aR, calculateMovingAverages as aS, calculatePaybackPeriod as aT, calculatePercentageChange as aU, calculateRoi as aV, calculateRuleOf72 as aW, calculateSavingsGoal as aX, calculateSimpleInterest as aY, calculateTax as aZ, calculateTimeValue as a_, type PercentageChangeResult as aa, type Permission as ab, type PxConvertResult as ac, type RoiInput as ad, type RoiResult as ae, type RuleOf72Direction as af, type RuleOf72Result as ag, type SavingsGoalInput as ah, type SavingsGoalMode as ai, type SavingsGoalResult as aj, type SemverVersion as ak, type SimpleInterestResult as al, type SubnetInfo as am, type SuccessiveDiscountResult as an, type SuccessiveDiscountStep as ao, type TaxDirection as ap, type TaxResult as aq, type TimeValueDirection as ar, type TimeValueResult as as, type TipSplitResult as at, USD_DENOMINATIONS as au, type UnitPriceItem as av, type UnitPriceResult as aw, type VideoBitrateInput as ax, type VideoBitrateMode as ay, type VideoBitrateResult as az, type AprApyResult as b, calculateVideoBitrate as b0, compareSemver as b1, compareUnitPrices as b2, convert as b3, convertAprApy as b4, convertBytes as b5, convertIp as b6, coverBox as b7, decimalToIp as b8, decimalToIpCidr as b9, permissionsToChmod as bA, permissionsToOctal as bB, permissionsToSymbolic as bC, ptToPx as bD, pxToAll as bE, pxToViewport as bF, remToPx as bG, satisfiesRange as bH, scaleByHeight as bI, scaleByWidth as bJ, sortVersions as bK, splitSubnet as bL, symbolicToPermissions as bM, validateBarcode as bN, validateCardNumber as bO, validateIban as bP, validateIsbn as bQ, viewportToPx as bR, describePermissions as ba, fitIntoBox as bb, formatNumber as bc, formatValue as bd, formatVwValue as be, formatWithSeparator as bf, gcd as bg, ipFromBinary as bh, ipFromDecimal as bi, ipFromHex as bj, ipToBinary as bk, ipToDecimal as bl, ipToDecimalCidr as bm, ipToHex as bn, ipToOctal as bo, isValid as bp, isValidCidr as bq, isValidIp as br, isValidIpv4 as bs, marginToMarkup as bt, markupToMargin as bu, octalToPermissions as bv, parseFileSize as bw, parseInput as bx, parseNumberString as by, parseSemver 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.51.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",
|