@utilix-tech/sdk 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +11 -3
- package/dist/{chunk-BDQXYFTO.js → chunk-3KIUADK4.js} +49 -1
- package/dist/{chunk-ZZJPD366.js → chunk-NKN656TQ.js} +44 -1
- package/dist/{data-BI_007dA.d.cts → data-CupeugaR.d.cts} +37 -2
- package/dist/{data-BI_007dA.d.ts → data-CupeugaR.d.ts} +37 -2
- package/dist/index.cjs +91 -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 +48 -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 +43 -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-y30YVhqI.d.cts → units-p-1Ikx7l.d.cts} +39 -2
- package/dist/{units-y30YVhqI.d.ts → units-p-1Ikx7l.d.ts} +39 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
|
|
4
4
|
|
|
5
|
+
## 0.53.0
|
|
6
|
+
- Add `calculateCreditUtilization` (credit-utilization-calculator): compute per-account and overall credit utilization (balance / limit) from one or more credit accounts, plus a qualitative tier matching common credit-scoring guidance.
|
|
7
|
+
- Add `analyzeCaptionSpeed` (caption-reading-speed-checker): parse an SRT or WebVTT file and report the words-per-minute reading speed of every cue, flagging ones that exceed common broadcast accessibility guidelines.
|
|
8
|
+
|
|
5
9
|
## 0.52.0
|
|
6
10
|
- Add `validateEditorConfig` (editorconfig-validator): parse an .editorconfig file into its root flag and glob sections, and flag structural mistakes against the EditorConfig spec.
|
|
7
11
|
- Add `validateTsconfig` (tsconfig-validator): parse a tsconfig.json file as JSONC and flag unknown keys, unknown compilerOptions, and type mismatches against a curated list of known options.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**646 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)
|
|
@@ -204,7 +204,7 @@ analyzeKeywordDensity("machine learning models power machine learning systems");
|
|
|
204
204
|
import { parseCsv, csvToJson, validateYaml, resolveYamlAnchors, tomlToJson, jsonToToml,
|
|
205
205
|
formatXml, xmlToJson, jsonToXml, parseIni,
|
|
206
206
|
validateNdjson, formatNdjson, ndjsonToJsonArray, diffEnvExample,
|
|
207
|
-
parseSubtitles, convertSubtitles, shiftSubtitles, parseFrontMatter,
|
|
207
|
+
parseSubtitles, convertSubtitles, shiftSubtitles, analyzeCaptionSpeed, parseFrontMatter,
|
|
208
208
|
generateMarkdownToc, csvToSqlInsert, findCsvDuplicateRows, calculateMarkdownTaskListProgress } from "@utilix-tech/sdk/data";
|
|
209
209
|
|
|
210
210
|
// CSV
|
|
@@ -242,6 +242,10 @@ convertSubtitles("1\n00:00:01,000 --> 00:00:04,000\nHello there.\n", "vtt");
|
|
|
242
242
|
shiftSubtitles("1\n00:00:01,000 --> 00:00:04,000\nHi\n", -2.5);
|
|
243
243
|
// shifts every cue 2.5s earlier, clamping anything below zero to 00:00:00
|
|
244
244
|
|
|
245
|
+
// Caption reading speed: flag cues faster than ~180 WPM / ~20 chars/sec (both adjustable)
|
|
246
|
+
analyzeCaptionSpeed("1\n00:00:01,000 --> 00:00:02,000\nThis line is read far too fast for anyone to follow.\n");
|
|
247
|
+
// { cueCount: 1, averageWpm: 660, flaggedCount: 1, cues: [{ wpm: 660, exceedsWpm: true, ... }], ... }
|
|
248
|
+
|
|
245
249
|
// Markdown front matter: split a document into its YAML front matter and body
|
|
246
250
|
parseFrontMatter("---\ntitle: Hello World\ntags: [foo, bar]\n---\n# Body");
|
|
247
251
|
// { frontMatter: { title: "Hello World", tags: ["foo", "bar"] }, body: "# Body", hasFrontMatter: true, ... }
|
|
@@ -322,7 +326,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
|
|
|
322
326
|
### `/units`: Conversions
|
|
323
327
|
|
|
324
328
|
```ts
|
|
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";
|
|
329
|
+
import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule, calculateCashRounding, calculateMovingAverages, calculateGpa, calculateCreditUtilization } from "@utilix-tech/sdk/units";
|
|
326
330
|
|
|
327
331
|
// File sizes
|
|
328
332
|
convertBytes(1073741824, "GB"); // 1
|
|
@@ -456,6 +460,10 @@ calculateMovingAverages([102, 104, 101, 108, 112], 3);
|
|
|
456
460
|
// Weighted GPA from a list of courses (letter grade + credit hours)
|
|
457
461
|
calculateGpa([{ name: "Calculus", grade: "A", credits: 4 }, { name: "History", grade: "B+", credits: 3 }]);
|
|
458
462
|
// { gpa: 3.7, totalCredits: 7, totalQualityPoints: 25.9, courses: [...] }
|
|
463
|
+
|
|
464
|
+
// Per-account and overall credit utilization, plus a qualitative tier
|
|
465
|
+
calculateCreditUtilization([{ label: "Visa", balance: 500, limit: 5000 }, { label: "Amex", balance: 1200, limit: 3000 }]);
|
|
466
|
+
// { overallUtilizationPercent: 21.25, overallTier: "good", totalBalance: 1700, totalLimit: 8000, accounts: [...] }
|
|
459
467
|
```
|
|
460
468
|
|
|
461
469
|
---
|
|
@@ -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
|
+
analyzeCaptionSpeed: () => analyzeCaptionSpeed,
|
|
8
9
|
calculateMarkdownTaskListProgress: () => calculateMarkdownTaskListProgress,
|
|
9
10
|
convertSubtitles: () => convertSubtitles,
|
|
10
11
|
csvToJson: () => csvToJson,
|
|
@@ -1340,6 +1341,53 @@ function shiftSubtitles(input, offsetSeconds, target) {
|
|
|
1340
1341
|
warnings
|
|
1341
1342
|
};
|
|
1342
1343
|
}
|
|
1344
|
+
function analyzeCaptionSpeed(input, wpmThreshold = 180, cpsThreshold = 20) {
|
|
1345
|
+
if (!Number.isFinite(wpmThreshold) || wpmThreshold <= 0) {
|
|
1346
|
+
return { error: "wpmThreshold must be a finite number greater than zero" };
|
|
1347
|
+
}
|
|
1348
|
+
if (!Number.isFinite(cpsThreshold) || cpsThreshold <= 0) {
|
|
1349
|
+
return { error: "cpsThreshold must be a finite number greater than zero" };
|
|
1350
|
+
}
|
|
1351
|
+
const parsed = parseSubtitles(input);
|
|
1352
|
+
if ("error" in parsed) return parsed;
|
|
1353
|
+
const round1 = (n) => Math.round(n * 10) / 10;
|
|
1354
|
+
const cues = [];
|
|
1355
|
+
for (const cue of parsed.cues) {
|
|
1356
|
+
const text = cue.text.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
|
|
1357
|
+
const durationSeconds = cue.end - cue.start;
|
|
1358
|
+
if (text.length === 0 || durationSeconds <= 0) continue;
|
|
1359
|
+
const wordCount = text.split(" ").filter(Boolean).length;
|
|
1360
|
+
const charCount = text.length;
|
|
1361
|
+
const wpm = wordCount / durationSeconds * 60;
|
|
1362
|
+
const charsPerSecond = charCount / durationSeconds;
|
|
1363
|
+
cues.push({
|
|
1364
|
+
index: cues.length + 1,
|
|
1365
|
+
start: round1(cue.start),
|
|
1366
|
+
end: round1(cue.end),
|
|
1367
|
+
text,
|
|
1368
|
+
durationSeconds: round1(durationSeconds),
|
|
1369
|
+
wordCount,
|
|
1370
|
+
charCount,
|
|
1371
|
+
wpm: round1(wpm),
|
|
1372
|
+
charsPerSecond: round1(charsPerSecond),
|
|
1373
|
+
exceedsWpm: wpm > wpmThreshold,
|
|
1374
|
+
exceedsCps: charsPerSecond > cpsThreshold
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
if (cues.length === 0) {
|
|
1378
|
+
return { error: "No cues with both text and a positive duration were found" };
|
|
1379
|
+
}
|
|
1380
|
+
const wpmValues = cues.map((c) => c.wpm);
|
|
1381
|
+
return {
|
|
1382
|
+
cueCount: cues.length,
|
|
1383
|
+
cues,
|
|
1384
|
+
averageWpm: round1(wpmValues.reduce((a, b) => a + b, 0) / wpmValues.length),
|
|
1385
|
+
maxWpm: round1(Math.max(...wpmValues)),
|
|
1386
|
+
flaggedCount: cues.filter((c) => c.exceedsWpm || c.exceedsCps).length,
|
|
1387
|
+
wpmThreshold,
|
|
1388
|
+
cpsThreshold
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1343
1391
|
function parseFrontMatterScalar(value) {
|
|
1344
1392
|
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
1345
1393
|
return value.slice(1, -1);
|
|
@@ -1673,4 +1721,4 @@ function calculateMarkdownTaskListProgress(markdown) {
|
|
|
1673
1721
|
return { totalItems, completedItems, percentComplete, sections, items };
|
|
1674
1722
|
}
|
|
1675
1723
|
|
|
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 };
|
|
1724
|
+
export { analyzeCaptionSpeed, 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 };
|
|
@@ -27,6 +27,7 @@ __export(units_exports, {
|
|
|
27
27
|
calculateCdMaturity: () => calculateCdMaturity,
|
|
28
28
|
calculateChange: () => calculateChange,
|
|
29
29
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
30
|
+
calculateCreditUtilization: () => calculateCreditUtilization,
|
|
30
31
|
calculateDepreciationSchedule: () => calculateDepreciationSchedule,
|
|
31
32
|
calculateDiscount: () => calculateDiscount,
|
|
32
33
|
calculateEmi: () => calculateEmi,
|
|
@@ -2190,5 +2191,47 @@ function calculateGpa(courses) {
|
|
|
2190
2191
|
gpa: round22(totalQualityPoints / totalCredits)
|
|
2191
2192
|
};
|
|
2192
2193
|
}
|
|
2194
|
+
function _classifyUtilization(percent) {
|
|
2195
|
+
if (percent < 10) return "excellent";
|
|
2196
|
+
if (percent < 30) return "good";
|
|
2197
|
+
if (percent < 50) return "fair";
|
|
2198
|
+
return "poor";
|
|
2199
|
+
}
|
|
2200
|
+
function calculateCreditUtilization(accounts) {
|
|
2201
|
+
if (!Array.isArray(accounts) || accounts.length === 0) {
|
|
2202
|
+
return { error: "accounts must be a non-empty array" };
|
|
2203
|
+
}
|
|
2204
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2205
|
+
let totalBalance = 0;
|
|
2206
|
+
let totalLimit = 0;
|
|
2207
|
+
const results = [];
|
|
2208
|
+
for (let i = 0; i < accounts.length; i++) {
|
|
2209
|
+
const account = accounts[i];
|
|
2210
|
+
if (typeof account.balance !== "number" || !Number.isFinite(account.balance) || account.balance < 0) {
|
|
2211
|
+
return { error: `account ${i + 1}: balance must be a finite, non-negative number` };
|
|
2212
|
+
}
|
|
2213
|
+
if (typeof account.limit !== "number" || !Number.isFinite(account.limit) || account.limit <= 0) {
|
|
2214
|
+
return { error: `account ${i + 1}: limit must be a finite number greater than zero` };
|
|
2215
|
+
}
|
|
2216
|
+
const utilizationPercent = round22(account.balance / account.limit * 100);
|
|
2217
|
+
totalBalance += account.balance;
|
|
2218
|
+
totalLimit += account.limit;
|
|
2219
|
+
results.push({
|
|
2220
|
+
label: account.label?.trim() || `Account ${i + 1}`,
|
|
2221
|
+
balance: account.balance,
|
|
2222
|
+
limit: account.limit,
|
|
2223
|
+
utilizationPercent,
|
|
2224
|
+
tier: _classifyUtilization(utilizationPercent)
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2227
|
+
const overallUtilizationPercent = round22(totalBalance / totalLimit * 100);
|
|
2228
|
+
return {
|
|
2229
|
+
accounts: results,
|
|
2230
|
+
totalBalance: round22(totalBalance),
|
|
2231
|
+
totalLimit: round22(totalLimit),
|
|
2232
|
+
overallUtilizationPercent,
|
|
2233
|
+
overallTier: _classifyUtilization(overallUtilizationPercent)
|
|
2234
|
+
};
|
|
2235
|
+
}
|
|
2193
2236
|
|
|
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 };
|
|
2237
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, 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 };
|
|
@@ -277,6 +277,38 @@ declare function convertSubtitles(input: string, target: SubtitleFormat, sourceF
|
|
|
277
277
|
declare function shiftSubtitles(input: string, offsetSeconds: number, target?: SubtitleFormat): ConvertedSubtitles | {
|
|
278
278
|
error: string;
|
|
279
279
|
};
|
|
280
|
+
interface CaptionSpeedCue {
|
|
281
|
+
index: number;
|
|
282
|
+
start: number;
|
|
283
|
+
end: number;
|
|
284
|
+
text: string;
|
|
285
|
+
durationSeconds: number;
|
|
286
|
+
wordCount: number;
|
|
287
|
+
charCount: number;
|
|
288
|
+
wpm: number;
|
|
289
|
+
charsPerSecond: number;
|
|
290
|
+
exceedsWpm: boolean;
|
|
291
|
+
exceedsCps: boolean;
|
|
292
|
+
}
|
|
293
|
+
interface CaptionSpeedResult {
|
|
294
|
+
cueCount: number;
|
|
295
|
+
cues: CaptionSpeedCue[];
|
|
296
|
+
averageWpm: number;
|
|
297
|
+
maxWpm: number;
|
|
298
|
+
flaggedCount: number;
|
|
299
|
+
wpmThreshold: number;
|
|
300
|
+
cpsThreshold: number;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Parse an SRT or WebVTT file and report the words-per-minute reading speed
|
|
304
|
+
* implied by each cue's word count and duration, flagging cues that exceed
|
|
305
|
+
* common broadcast accessibility guidelines (default: ~180 WPM, ~20
|
|
306
|
+
* characters/second). Built on parseSubtitles for cue extraction; HTML-style
|
|
307
|
+
* cue tags like <i> are stripped before counting words and characters.
|
|
308
|
+
*/
|
|
309
|
+
declare function analyzeCaptionSpeed(input: string, wpmThreshold?: number, cpsThreshold?: number): CaptionSpeedResult | {
|
|
310
|
+
error: string;
|
|
311
|
+
};
|
|
280
312
|
interface FrontMatterResult {
|
|
281
313
|
frontMatter: Record<string, unknown>;
|
|
282
314
|
body: string;
|
|
@@ -427,6 +459,8 @@ declare function calculateMarkdownTaskListProgress(markdown: string): MarkdownTa
|
|
|
427
459
|
error: string;
|
|
428
460
|
};
|
|
429
461
|
|
|
462
|
+
type data_CaptionSpeedCue = CaptionSpeedCue;
|
|
463
|
+
type data_CaptionSpeedResult = CaptionSpeedResult;
|
|
430
464
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
431
465
|
type data_CsvDuplicateGroup = CsvDuplicateGroup;
|
|
432
466
|
type data_CsvDuplicateOptions = CsvDuplicateOptions;
|
|
@@ -461,6 +495,7 @@ type data_XmlToJsonOptions = XmlToJsonOptions;
|
|
|
461
495
|
type data_YamlAnchorInfo = YamlAnchorInfo;
|
|
462
496
|
type data_YamlAnchorResolveError = YamlAnchorResolveError;
|
|
463
497
|
type data_YamlAnchorResolveResult = YamlAnchorResolveResult;
|
|
498
|
+
declare const data_analyzeCaptionSpeed: typeof analyzeCaptionSpeed;
|
|
464
499
|
declare const data_calculateMarkdownTaskListProgress: typeof calculateMarkdownTaskListProgress;
|
|
465
500
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
466
501
|
declare const data_csvToJson: typeof csvToJson;
|
|
@@ -511,7 +546,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
511
546
|
declare const data_validateYaml: typeof validateYaml;
|
|
512
547
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
513
548
|
declare namespace data {
|
|
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 };
|
|
549
|
+
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, 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_analyzeCaptionSpeed as analyzeCaptionSpeed, 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 };
|
|
515
550
|
}
|
|
516
551
|
|
|
517
|
-
export {
|
|
552
|
+
export { getSection as $, calculateMarkdownTaskListProgress as A, convertSubtitles as B, type CaptionSpeedCue as C, csvToJson as D, type EnvDiffError as E, type FrontMatterError as F, csvToSqlInsert as G, detectDelimiter as H, type IniSection as I, detectSubtitleFormat as J, diffEnvExample as K, envToExport as L, type MarkdownTaskListItem as M, type NdjsonLineResult as N, envToJson as O, type ParseOptions as P, findCsvDuplicateRows as Q, formatNdjson as R, type SubtitleCue as S, type TomlFormatResult as T, formatSubtitleTimestamp as U, type ValidationResult as V, formatToml as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, formatXml as Z, generateMarkdownToc as _, type CaptionSpeedResult as a, getSectionNames as a0, getTomlStats as a1, getXmlStats as a2, getYamlStats as a3, iniToJson as a4, jsonArrayToNdjson as a5, jsonToIni as a6, jsonToToml as a7, jsonToXml as a8, minifyNdjson as a9, minifyToml as aa, minifyXml as ab, ndjsonToJsonArray as ac, parseCsv as ad, parseEnv as ae, parseFrontMatter as af, parseIni as ag, parseSubtitleTimestamp as ah, parseSubtitles as ai, parseXmlToObject as aj, resolveYamlAnchors as ak, serializeSubtitles as al, shiftSubtitles as am, stringifyIni as an, toCsvString as ao, tomlToJson as ap, validateEnvKey as aq, validateIni as ar, validateNdjson as as, validateToml as at, validateXml as au, validateYaml as av, xmlToJson as aw, type ConvertedSubtitles as b, type CsvDuplicateGroup as c, data as d, type CsvDuplicateOptions as e, type CsvDuplicateResult as f, type CsvParseResult as g, type CsvToSqlOptions as h, type CsvToSqlResult as i, type EnvDiffResult as j, type EnvEntry as k, type EnvParseResult as l, type FrontMatterResult as m, type MarkdownTaskListProgressResult as n, type MarkdownTaskListSectionSummary as o, type MarkdownTocEntry as p, type MarkdownTocOptions as q, type MarkdownTocResult as r, type NdjsonValidateResult as s, type ParsedIni as t, type ParsedSubtitles as u, type SubtitleFormat as v, type XmlToJsonOptions as w, type YamlAnchorResolveError as x, type YamlAnchorResolveResult as y, analyzeCaptionSpeed as z };
|
|
@@ -277,6 +277,38 @@ declare function convertSubtitles(input: string, target: SubtitleFormat, sourceF
|
|
|
277
277
|
declare function shiftSubtitles(input: string, offsetSeconds: number, target?: SubtitleFormat): ConvertedSubtitles | {
|
|
278
278
|
error: string;
|
|
279
279
|
};
|
|
280
|
+
interface CaptionSpeedCue {
|
|
281
|
+
index: number;
|
|
282
|
+
start: number;
|
|
283
|
+
end: number;
|
|
284
|
+
text: string;
|
|
285
|
+
durationSeconds: number;
|
|
286
|
+
wordCount: number;
|
|
287
|
+
charCount: number;
|
|
288
|
+
wpm: number;
|
|
289
|
+
charsPerSecond: number;
|
|
290
|
+
exceedsWpm: boolean;
|
|
291
|
+
exceedsCps: boolean;
|
|
292
|
+
}
|
|
293
|
+
interface CaptionSpeedResult {
|
|
294
|
+
cueCount: number;
|
|
295
|
+
cues: CaptionSpeedCue[];
|
|
296
|
+
averageWpm: number;
|
|
297
|
+
maxWpm: number;
|
|
298
|
+
flaggedCount: number;
|
|
299
|
+
wpmThreshold: number;
|
|
300
|
+
cpsThreshold: number;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Parse an SRT or WebVTT file and report the words-per-minute reading speed
|
|
304
|
+
* implied by each cue's word count and duration, flagging cues that exceed
|
|
305
|
+
* common broadcast accessibility guidelines (default: ~180 WPM, ~20
|
|
306
|
+
* characters/second). Built on parseSubtitles for cue extraction; HTML-style
|
|
307
|
+
* cue tags like <i> are stripped before counting words and characters.
|
|
308
|
+
*/
|
|
309
|
+
declare function analyzeCaptionSpeed(input: string, wpmThreshold?: number, cpsThreshold?: number): CaptionSpeedResult | {
|
|
310
|
+
error: string;
|
|
311
|
+
};
|
|
280
312
|
interface FrontMatterResult {
|
|
281
313
|
frontMatter: Record<string, unknown>;
|
|
282
314
|
body: string;
|
|
@@ -427,6 +459,8 @@ declare function calculateMarkdownTaskListProgress(markdown: string): MarkdownTa
|
|
|
427
459
|
error: string;
|
|
428
460
|
};
|
|
429
461
|
|
|
462
|
+
type data_CaptionSpeedCue = CaptionSpeedCue;
|
|
463
|
+
type data_CaptionSpeedResult = CaptionSpeedResult;
|
|
430
464
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
431
465
|
type data_CsvDuplicateGroup = CsvDuplicateGroup;
|
|
432
466
|
type data_CsvDuplicateOptions = CsvDuplicateOptions;
|
|
@@ -461,6 +495,7 @@ type data_XmlToJsonOptions = XmlToJsonOptions;
|
|
|
461
495
|
type data_YamlAnchorInfo = YamlAnchorInfo;
|
|
462
496
|
type data_YamlAnchorResolveError = YamlAnchorResolveError;
|
|
463
497
|
type data_YamlAnchorResolveResult = YamlAnchorResolveResult;
|
|
498
|
+
declare const data_analyzeCaptionSpeed: typeof analyzeCaptionSpeed;
|
|
464
499
|
declare const data_calculateMarkdownTaskListProgress: typeof calculateMarkdownTaskListProgress;
|
|
465
500
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
466
501
|
declare const data_csvToJson: typeof csvToJson;
|
|
@@ -511,7 +546,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
511
546
|
declare const data_validateYaml: typeof validateYaml;
|
|
512
547
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
513
548
|
declare namespace data {
|
|
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 };
|
|
549
|
+
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, 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_analyzeCaptionSpeed as analyzeCaptionSpeed, 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 };
|
|
515
550
|
}
|
|
516
551
|
|
|
517
|
-
export {
|
|
552
|
+
export { getSection as $, calculateMarkdownTaskListProgress as A, convertSubtitles as B, type CaptionSpeedCue as C, csvToJson as D, type EnvDiffError as E, type FrontMatterError as F, csvToSqlInsert as G, detectDelimiter as H, type IniSection as I, detectSubtitleFormat as J, diffEnvExample as K, envToExport as L, type MarkdownTaskListItem as M, type NdjsonLineResult as N, envToJson as O, type ParseOptions as P, findCsvDuplicateRows as Q, formatNdjson as R, type SubtitleCue as S, type TomlFormatResult as T, formatSubtitleTimestamp as U, type ValidationResult as V, formatToml as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, formatXml as Z, generateMarkdownToc as _, type CaptionSpeedResult as a, getSectionNames as a0, getTomlStats as a1, getXmlStats as a2, getYamlStats as a3, iniToJson as a4, jsonArrayToNdjson as a5, jsonToIni as a6, jsonToToml as a7, jsonToXml as a8, minifyNdjson as a9, minifyToml as aa, minifyXml as ab, ndjsonToJsonArray as ac, parseCsv as ad, parseEnv as ae, parseFrontMatter as af, parseIni as ag, parseSubtitleTimestamp as ah, parseSubtitles as ai, parseXmlToObject as aj, resolveYamlAnchors as ak, serializeSubtitles as al, shiftSubtitles as am, stringifyIni as an, toCsvString as ao, tomlToJson as ap, validateEnvKey as aq, validateIni as ar, validateNdjson as as, validateToml as at, validateXml as au, validateYaml as av, xmlToJson as aw, type ConvertedSubtitles as b, type CsvDuplicateGroup as c, data as d, type CsvDuplicateOptions as e, type CsvDuplicateResult as f, type CsvParseResult as g, type CsvToSqlOptions as h, type CsvToSqlResult as i, type EnvDiffResult as j, type EnvEntry as k, type EnvParseResult as l, type FrontMatterResult as m, type MarkdownTaskListProgressResult as n, type MarkdownTaskListSectionSummary as o, type MarkdownTocEntry as p, type MarkdownTocOptions as q, type MarkdownTocResult as r, type NdjsonValidateResult as s, type ParsedIni as t, type ParsedSubtitles as u, type SubtitleFormat as v, type XmlToJsonOptions as w, type YamlAnchorResolveError as x, type YamlAnchorResolveResult as y, analyzeCaptionSpeed 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
|
+
analyzeCaptionSpeed: () => analyzeCaptionSpeed,
|
|
5154
5155
|
calculateMarkdownTaskListProgress: () => calculateMarkdownTaskListProgress,
|
|
5155
5156
|
convertSubtitles: () => convertSubtitles,
|
|
5156
5157
|
csvToJson: () => csvToJson2,
|
|
@@ -6486,6 +6487,53 @@ function shiftSubtitles(input, offsetSeconds, target) {
|
|
|
6486
6487
|
warnings
|
|
6487
6488
|
};
|
|
6488
6489
|
}
|
|
6490
|
+
function analyzeCaptionSpeed(input, wpmThreshold = 180, cpsThreshold = 20) {
|
|
6491
|
+
if (!Number.isFinite(wpmThreshold) || wpmThreshold <= 0) {
|
|
6492
|
+
return { error: "wpmThreshold must be a finite number greater than zero" };
|
|
6493
|
+
}
|
|
6494
|
+
if (!Number.isFinite(cpsThreshold) || cpsThreshold <= 0) {
|
|
6495
|
+
return { error: "cpsThreshold must be a finite number greater than zero" };
|
|
6496
|
+
}
|
|
6497
|
+
const parsed = parseSubtitles(input);
|
|
6498
|
+
if ("error" in parsed) return parsed;
|
|
6499
|
+
const round12 = (n) => Math.round(n * 10) / 10;
|
|
6500
|
+
const cues = [];
|
|
6501
|
+
for (const cue of parsed.cues) {
|
|
6502
|
+
const text = cue.text.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
|
|
6503
|
+
const durationSeconds = cue.end - cue.start;
|
|
6504
|
+
if (text.length === 0 || durationSeconds <= 0) continue;
|
|
6505
|
+
const wordCount = text.split(" ").filter(Boolean).length;
|
|
6506
|
+
const charCount = text.length;
|
|
6507
|
+
const wpm = wordCount / durationSeconds * 60;
|
|
6508
|
+
const charsPerSecond = charCount / durationSeconds;
|
|
6509
|
+
cues.push({
|
|
6510
|
+
index: cues.length + 1,
|
|
6511
|
+
start: round12(cue.start),
|
|
6512
|
+
end: round12(cue.end),
|
|
6513
|
+
text,
|
|
6514
|
+
durationSeconds: round12(durationSeconds),
|
|
6515
|
+
wordCount,
|
|
6516
|
+
charCount,
|
|
6517
|
+
wpm: round12(wpm),
|
|
6518
|
+
charsPerSecond: round12(charsPerSecond),
|
|
6519
|
+
exceedsWpm: wpm > wpmThreshold,
|
|
6520
|
+
exceedsCps: charsPerSecond > cpsThreshold
|
|
6521
|
+
});
|
|
6522
|
+
}
|
|
6523
|
+
if (cues.length === 0) {
|
|
6524
|
+
return { error: "No cues with both text and a positive duration were found" };
|
|
6525
|
+
}
|
|
6526
|
+
const wpmValues = cues.map((c) => c.wpm);
|
|
6527
|
+
return {
|
|
6528
|
+
cueCount: cues.length,
|
|
6529
|
+
cues,
|
|
6530
|
+
averageWpm: round12(wpmValues.reduce((a, b) => a + b, 0) / wpmValues.length),
|
|
6531
|
+
maxWpm: round12(Math.max(...wpmValues)),
|
|
6532
|
+
flaggedCount: cues.filter((c) => c.exceedsWpm || c.exceedsCps).length,
|
|
6533
|
+
wpmThreshold,
|
|
6534
|
+
cpsThreshold
|
|
6535
|
+
};
|
|
6536
|
+
}
|
|
6489
6537
|
function parseFrontMatterScalar(value) {
|
|
6490
6538
|
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
6491
6539
|
return value.slice(1, -1);
|
|
@@ -8242,6 +8290,7 @@ __export(units_exports, {
|
|
|
8242
8290
|
calculateCdMaturity: () => calculateCdMaturity,
|
|
8243
8291
|
calculateChange: () => calculateChange,
|
|
8244
8292
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
8293
|
+
calculateCreditUtilization: () => calculateCreditUtilization,
|
|
8245
8294
|
calculateDepreciationSchedule: () => calculateDepreciationSchedule,
|
|
8246
8295
|
calculateDiscount: () => calculateDiscount,
|
|
8247
8296
|
calculateEmi: () => calculateEmi,
|
|
@@ -10405,6 +10454,48 @@ function calculateGpa(courses) {
|
|
|
10405
10454
|
gpa: round23(totalQualityPoints / totalCredits)
|
|
10406
10455
|
};
|
|
10407
10456
|
}
|
|
10457
|
+
function _classifyUtilization(percent) {
|
|
10458
|
+
if (percent < 10) return "excellent";
|
|
10459
|
+
if (percent < 30) return "good";
|
|
10460
|
+
if (percent < 50) return "fair";
|
|
10461
|
+
return "poor";
|
|
10462
|
+
}
|
|
10463
|
+
function calculateCreditUtilization(accounts) {
|
|
10464
|
+
if (!Array.isArray(accounts) || accounts.length === 0) {
|
|
10465
|
+
return { error: "accounts must be a non-empty array" };
|
|
10466
|
+
}
|
|
10467
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10468
|
+
let totalBalance = 0;
|
|
10469
|
+
let totalLimit = 0;
|
|
10470
|
+
const results = [];
|
|
10471
|
+
for (let i = 0; i < accounts.length; i++) {
|
|
10472
|
+
const account = accounts[i];
|
|
10473
|
+
if (typeof account.balance !== "number" || !Number.isFinite(account.balance) || account.balance < 0) {
|
|
10474
|
+
return { error: `account ${i + 1}: balance must be a finite, non-negative number` };
|
|
10475
|
+
}
|
|
10476
|
+
if (typeof account.limit !== "number" || !Number.isFinite(account.limit) || account.limit <= 0) {
|
|
10477
|
+
return { error: `account ${i + 1}: limit must be a finite number greater than zero` };
|
|
10478
|
+
}
|
|
10479
|
+
const utilizationPercent = round23(account.balance / account.limit * 100);
|
|
10480
|
+
totalBalance += account.balance;
|
|
10481
|
+
totalLimit += account.limit;
|
|
10482
|
+
results.push({
|
|
10483
|
+
label: account.label?.trim() || `Account ${i + 1}`,
|
|
10484
|
+
balance: account.balance,
|
|
10485
|
+
limit: account.limit,
|
|
10486
|
+
utilizationPercent,
|
|
10487
|
+
tier: _classifyUtilization(utilizationPercent)
|
|
10488
|
+
});
|
|
10489
|
+
}
|
|
10490
|
+
const overallUtilizationPercent = round23(totalBalance / totalLimit * 100);
|
|
10491
|
+
return {
|
|
10492
|
+
accounts: results,
|
|
10493
|
+
totalBalance: round23(totalBalance),
|
|
10494
|
+
totalLimit: round23(totalLimit),
|
|
10495
|
+
overallUtilizationPercent,
|
|
10496
|
+
overallTier: _classifyUtilization(overallUtilizationPercent)
|
|
10497
|
+
};
|
|
10498
|
+
}
|
|
10408
10499
|
|
|
10409
10500
|
// src/tools/network.ts
|
|
10410
10501
|
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-CupeugaR.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-p-1Ikx7l.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-B_gDkRAx.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-CupeugaR.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-p-1Ikx7l.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-B_gDkRAx.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-NKN656TQ.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-K4ZERKBD.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-3KIUADK4.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
|
@@ -1309,6 +1309,53 @@ function shiftSubtitles(input, offsetSeconds, target) {
|
|
|
1309
1309
|
warnings
|
|
1310
1310
|
};
|
|
1311
1311
|
}
|
|
1312
|
+
function analyzeCaptionSpeed(input, wpmThreshold = 180, cpsThreshold = 20) {
|
|
1313
|
+
if (!Number.isFinite(wpmThreshold) || wpmThreshold <= 0) {
|
|
1314
|
+
return { error: "wpmThreshold must be a finite number greater than zero" };
|
|
1315
|
+
}
|
|
1316
|
+
if (!Number.isFinite(cpsThreshold) || cpsThreshold <= 0) {
|
|
1317
|
+
return { error: "cpsThreshold must be a finite number greater than zero" };
|
|
1318
|
+
}
|
|
1319
|
+
const parsed = parseSubtitles(input);
|
|
1320
|
+
if ("error" in parsed) return parsed;
|
|
1321
|
+
const round1 = (n) => Math.round(n * 10) / 10;
|
|
1322
|
+
const cues = [];
|
|
1323
|
+
for (const cue of parsed.cues) {
|
|
1324
|
+
const text = cue.text.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
|
|
1325
|
+
const durationSeconds = cue.end - cue.start;
|
|
1326
|
+
if (text.length === 0 || durationSeconds <= 0) continue;
|
|
1327
|
+
const wordCount = text.split(" ").filter(Boolean).length;
|
|
1328
|
+
const charCount = text.length;
|
|
1329
|
+
const wpm = wordCount / durationSeconds * 60;
|
|
1330
|
+
const charsPerSecond = charCount / durationSeconds;
|
|
1331
|
+
cues.push({
|
|
1332
|
+
index: cues.length + 1,
|
|
1333
|
+
start: round1(cue.start),
|
|
1334
|
+
end: round1(cue.end),
|
|
1335
|
+
text,
|
|
1336
|
+
durationSeconds: round1(durationSeconds),
|
|
1337
|
+
wordCount,
|
|
1338
|
+
charCount,
|
|
1339
|
+
wpm: round1(wpm),
|
|
1340
|
+
charsPerSecond: round1(charsPerSecond),
|
|
1341
|
+
exceedsWpm: wpm > wpmThreshold,
|
|
1342
|
+
exceedsCps: charsPerSecond > cpsThreshold
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
if (cues.length === 0) {
|
|
1346
|
+
return { error: "No cues with both text and a positive duration were found" };
|
|
1347
|
+
}
|
|
1348
|
+
const wpmValues = cues.map((c) => c.wpm);
|
|
1349
|
+
return {
|
|
1350
|
+
cueCount: cues.length,
|
|
1351
|
+
cues,
|
|
1352
|
+
averageWpm: round1(wpmValues.reduce((a, b) => a + b, 0) / wpmValues.length),
|
|
1353
|
+
maxWpm: round1(Math.max(...wpmValues)),
|
|
1354
|
+
flaggedCount: cues.filter((c) => c.exceedsWpm || c.exceedsCps).length,
|
|
1355
|
+
wpmThreshold,
|
|
1356
|
+
cpsThreshold
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1312
1359
|
function parseFrontMatterScalar(value) {
|
|
1313
1360
|
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
1314
1361
|
return value.slice(1, -1);
|
|
@@ -1642,6 +1689,7 @@ function calculateMarkdownTaskListProgress(markdown) {
|
|
|
1642
1689
|
return { totalItems, completedItems, percentComplete, sections, items };
|
|
1643
1690
|
}
|
|
1644
1691
|
|
|
1692
|
+
exports.analyzeCaptionSpeed = analyzeCaptionSpeed;
|
|
1645
1693
|
exports.calculateMarkdownTaskListProgress = calculateMarkdownTaskListProgress;
|
|
1646
1694
|
exports.convertSubtitles = convertSubtitles;
|
|
1647
1695
|
exports.csvToJson = csvToJson;
|
package/dist/tools/data.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as
|
|
1
|
+
export { C as CaptionSpeedCue, a as CaptionSpeedResult, b as ConvertedSubtitles, c as CsvDuplicateGroup, e as CsvDuplicateOptions, f as CsvDuplicateResult, g as CsvParseResult, h as CsvToSqlOptions, i as CsvToSqlResult, E as EnvDiffError, j as EnvDiffResult, k as EnvEntry, l as EnvParseResult, F as FrontMatterError, m as FrontMatterResult, I as IniSection, M as MarkdownTaskListItem, n as MarkdownTaskListProgressResult, o as MarkdownTaskListSectionSummary, p as MarkdownTocEntry, q as MarkdownTocOptions, r as MarkdownTocResult, N as NdjsonLineResult, s as NdjsonValidateResult, P as ParseOptions, t as ParsedIni, u as ParsedSubtitles, S as SubtitleCue, v as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, w as XmlToJsonOptions, Y as YamlAnchorInfo, x as YamlAnchorResolveError, y as YamlAnchorResolveResult, z as analyzeCaptionSpeed, A as calculateMarkdownTaskListProgress, B as convertSubtitles, D as csvToJson, G as csvToSqlInsert, H as detectDelimiter, J as detectSubtitleFormat, K as diffEnvExample, L as envToExport, O as envToJson, Q as findCsvDuplicateRows, R as formatNdjson, U as formatSubtitleTimestamp, W as formatToml, Z as formatXml, _ as generateMarkdownToc, $ as getSection, a0 as getSectionNames, a1 as getTomlStats, a2 as getXmlStats, a3 as getYamlStats, a4 as iniToJson, a5 as jsonArrayToNdjson, a6 as jsonToIni, a7 as jsonToToml, a8 as jsonToXml, a9 as minifyNdjson, aa as minifyToml, ab as minifyXml, ac as ndjsonToJsonArray, ad as parseCsv, ae as parseEnv, af as parseFrontMatter, ag as parseIni, ah as parseSubtitleTimestamp, ai as parseSubtitles, aj as parseXmlToObject, ak as resolveYamlAnchors, al as serializeSubtitles, am as shiftSubtitles, an as stringifyIni, ao as toCsvString, ap as tomlToJson, aq as validateEnvKey, ar as validateIni, as as validateNdjson, at as validateToml, au as validateXml, av as validateYaml, aw as xmlToJson } from '../data-CupeugaR.cjs';
|
package/dist/tools/data.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as
|
|
1
|
+
export { C as CaptionSpeedCue, a as CaptionSpeedResult, b as ConvertedSubtitles, c as CsvDuplicateGroup, e as CsvDuplicateOptions, f as CsvDuplicateResult, g as CsvParseResult, h as CsvToSqlOptions, i as CsvToSqlResult, E as EnvDiffError, j as EnvDiffResult, k as EnvEntry, l as EnvParseResult, F as FrontMatterError, m as FrontMatterResult, I as IniSection, M as MarkdownTaskListItem, n as MarkdownTaskListProgressResult, o as MarkdownTaskListSectionSummary, p as MarkdownTocEntry, q as MarkdownTocOptions, r as MarkdownTocResult, N as NdjsonLineResult, s as NdjsonValidateResult, P as ParseOptions, t as ParsedIni, u as ParsedSubtitles, S as SubtitleCue, v as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, w as XmlToJsonOptions, Y as YamlAnchorInfo, x as YamlAnchorResolveError, y as YamlAnchorResolveResult, z as analyzeCaptionSpeed, A as calculateMarkdownTaskListProgress, B as convertSubtitles, D as csvToJson, G as csvToSqlInsert, H as detectDelimiter, J as detectSubtitleFormat, K as diffEnvExample, L as envToExport, O as envToJson, Q as findCsvDuplicateRows, R as formatNdjson, U as formatSubtitleTimestamp, W as formatToml, Z as formatXml, _ as generateMarkdownToc, $ as getSection, a0 as getSectionNames, a1 as getTomlStats, a2 as getXmlStats, a3 as getYamlStats, a4 as iniToJson, a5 as jsonArrayToNdjson, a6 as jsonToIni, a7 as jsonToToml, a8 as jsonToXml, a9 as minifyNdjson, aa as minifyToml, ab as minifyXml, ac as ndjsonToJsonArray, ad as parseCsv, ae as parseEnv, af as parseFrontMatter, ag as parseIni, ah as parseSubtitleTimestamp, ai as parseSubtitles, aj as parseXmlToObject, ak as resolveYamlAnchors, al as serializeSubtitles, am as shiftSubtitles, an as stringifyIni, ao as toCsvString, ap as tomlToJson, aq as validateEnvKey, ar as validateIni, as as validateNdjson, at as validateToml, au as validateXml, av as validateYaml, aw as xmlToJson } from '../data-CupeugaR.js';
|
package/dist/tools/data.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
1
|
+
export { analyzeCaptionSpeed, 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-3KIUADK4.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -2093,6 +2093,48 @@ function calculateGpa(courses) {
|
|
|
2093
2093
|
gpa: round22(totalQualityPoints / totalCredits)
|
|
2094
2094
|
};
|
|
2095
2095
|
}
|
|
2096
|
+
function _classifyUtilization(percent) {
|
|
2097
|
+
if (percent < 10) return "excellent";
|
|
2098
|
+
if (percent < 30) return "good";
|
|
2099
|
+
if (percent < 50) return "fair";
|
|
2100
|
+
return "poor";
|
|
2101
|
+
}
|
|
2102
|
+
function calculateCreditUtilization(accounts) {
|
|
2103
|
+
if (!Array.isArray(accounts) || accounts.length === 0) {
|
|
2104
|
+
return { error: "accounts must be a non-empty array" };
|
|
2105
|
+
}
|
|
2106
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2107
|
+
let totalBalance = 0;
|
|
2108
|
+
let totalLimit = 0;
|
|
2109
|
+
const results = [];
|
|
2110
|
+
for (let i = 0; i < accounts.length; i++) {
|
|
2111
|
+
const account = accounts[i];
|
|
2112
|
+
if (typeof account.balance !== "number" || !Number.isFinite(account.balance) || account.balance < 0) {
|
|
2113
|
+
return { error: `account ${i + 1}: balance must be a finite, non-negative number` };
|
|
2114
|
+
}
|
|
2115
|
+
if (typeof account.limit !== "number" || !Number.isFinite(account.limit) || account.limit <= 0) {
|
|
2116
|
+
return { error: `account ${i + 1}: limit must be a finite number greater than zero` };
|
|
2117
|
+
}
|
|
2118
|
+
const utilizationPercent = round22(account.balance / account.limit * 100);
|
|
2119
|
+
totalBalance += account.balance;
|
|
2120
|
+
totalLimit += account.limit;
|
|
2121
|
+
results.push({
|
|
2122
|
+
label: account.label?.trim() || `Account ${i + 1}`,
|
|
2123
|
+
balance: account.balance,
|
|
2124
|
+
limit: account.limit,
|
|
2125
|
+
utilizationPercent,
|
|
2126
|
+
tier: _classifyUtilization(utilizationPercent)
|
|
2127
|
+
});
|
|
2128
|
+
}
|
|
2129
|
+
const overallUtilizationPercent = round22(totalBalance / totalLimit * 100);
|
|
2130
|
+
return {
|
|
2131
|
+
accounts: results,
|
|
2132
|
+
totalBalance: round22(totalBalance),
|
|
2133
|
+
totalLimit: round22(totalLimit),
|
|
2134
|
+
overallUtilizationPercent,
|
|
2135
|
+
overallTier: _classifyUtilization(overallUtilizationPercent)
|
|
2136
|
+
};
|
|
2137
|
+
}
|
|
2096
2138
|
|
|
2097
2139
|
exports.BASE_LABELS = BASE_LABELS;
|
|
2098
2140
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -2118,6 +2160,7 @@ exports.calculateCashRounding = calculateCashRounding;
|
|
|
2118
2160
|
exports.calculateCdMaturity = calculateCdMaturity;
|
|
2119
2161
|
exports.calculateChange = calculateChange;
|
|
2120
2162
|
exports.calculateCompoundInterest = calculateCompoundInterest;
|
|
2163
|
+
exports.calculateCreditUtilization = calculateCreditUtilization;
|
|
2121
2164
|
exports.calculateDepreciationSchedule = calculateDepreciationSchedule;
|
|
2122
2165
|
exports.calculateDiscount = calculateDiscount;
|
|
2123
2166
|
exports.calculateEmi = calculateEmi;
|
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
|
|
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 CreditAccountInput, I as CreditAccountResult, J as CreditUtilizationResult, K as DepreciationMethod, L as DepreciationResult, M as DepreciationYear, N as Dimensions, O as DiscountField, P as DiscountInput, Q as DiscountResult, R as EmiResult, S as EmiTenureUnit, T as EmiYearlyBreakdownRow, U as FilePermissions, V as FormatOptions, W as GPA_GRADE_POINTS, X as GpaCourse, Y as GpaCourseResult, Z as GpaResult, _ as IbanValidationResult, $ as IpConversion, a0 as IsbnFormat, a1 as IsbnResult, a2 as LoanResult, a3 as MarginMarkupField, a4 as MarginMarkupInput, a5 as MarginMarkupResult, a6 as MovingAveragePoint, a7 as MovingAverageResult, a8 as NotationStyle, a9 as NumberBase, aa as PaybackPeriodInput, ab as PaybackPeriodResult, ac as PercentChangeDirection, ad as PercentageChangeResult, ae as Permission, af as PxConvertResult, ag as RoiInput, ah as RoiResult, ai as RuleOf72Direction, aj as RuleOf72Result, ak as SavingsGoalInput, al as SavingsGoalMode, am as SavingsGoalResult, an as SemverVersion, ao as SimpleInterestResult, ap as SubnetInfo, aq as SuccessiveDiscountResult, ar as SuccessiveDiscountStep, as as TaxDirection, at as TaxResult, au as TimeValueDirection, av as TimeValueResult, aw as TipSplitResult, ax as USD_DENOMINATIONS, ay as UnitPriceItem, az as UnitPriceResult, aA as UtilizationTier, aB as VideoBitrateInput, aC as VideoBitrateMode, aD as VideoBitrateResult, aE as ViewportConvertResult, aF as applySuccessiveDiscounts, aG as autoFormat, aH as bumpVersion, aI as calcAspectRatio, aJ as calcSubnet, aK as calculateBreakEven, aL as calculateCashBreakdown, aM as calculateCashRounding, aN as calculateCdMaturity, aO as calculateChange, aP as calculateCompoundInterest, aQ as calculateCreditUtilization, aR as calculateDepreciationSchedule, aS as calculateDiscount, aT as calculateEmi, aU as calculateGpa, aV as calculateLoan, aW as calculateMarginMarkup, aX as calculateMovingAverages, aY as calculatePaybackPeriod, aZ as calculatePercentageChange, a_ as calculateRoi, a$ as calculateRuleOf72, b0 as calculateSavingsGoal, b1 as calculateSimpleInterest, b2 as calculateTax, b3 as calculateTimeValue, b4 as calculateTipSplit, b5 as calculateVideoBitrate, b6 as compareSemver, b7 as compareUnitPrices, b8 as convert, b9 as convertAprApy, ba as convertBytes, bb as convertIp, bc as coverBox, bd as decimalToIp, be as decimalToIpCidr, bf as describePermissions, bg as fitIntoBox, bh as formatNumber, bi as formatValue, bj as formatVwValue, bk as formatWithSeparator, bl as gcd, bm as ipFromBinary, bn as ipFromDecimal, bo as ipFromHex, bp as ipToBinary, bq as ipToDecimal, br as ipToDecimalCidr, bs as ipToHex, bt as ipToOctal, bu as isValid, bv as isValidCidr, bw as isValidIp, bx as isValidIpv4, by as marginToMarkup, bz as markupToMargin, bA as octalToPermissions, bB as parseFileSize, bC as parseInput, bD as parseNumberString, bE as parseSemver, bF as permissionsToChmod, bG as permissionsToOctal, bH as permissionsToSymbolic, bI as ptToPx, bJ as pxToAll, bK as pxToViewport, bL as remToPx, bM as satisfiesRange, bN as scaleByHeight, bO as scaleByWidth, bP as sortVersions, bQ as splitSubnet, bR as symbolicToPermissions, bS as validateBarcode, bT as validateCardNumber, bU as validateIban, bV as validateIsbn, bW as viewportToPx } from '../units-p-1Ikx7l.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
|
|
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 CreditAccountInput, I as CreditAccountResult, J as CreditUtilizationResult, K as DepreciationMethod, L as DepreciationResult, M as DepreciationYear, N as Dimensions, O as DiscountField, P as DiscountInput, Q as DiscountResult, R as EmiResult, S as EmiTenureUnit, T as EmiYearlyBreakdownRow, U as FilePermissions, V as FormatOptions, W as GPA_GRADE_POINTS, X as GpaCourse, Y as GpaCourseResult, Z as GpaResult, _ as IbanValidationResult, $ as IpConversion, a0 as IsbnFormat, a1 as IsbnResult, a2 as LoanResult, a3 as MarginMarkupField, a4 as MarginMarkupInput, a5 as MarginMarkupResult, a6 as MovingAveragePoint, a7 as MovingAverageResult, a8 as NotationStyle, a9 as NumberBase, aa as PaybackPeriodInput, ab as PaybackPeriodResult, ac as PercentChangeDirection, ad as PercentageChangeResult, ae as Permission, af as PxConvertResult, ag as RoiInput, ah as RoiResult, ai as RuleOf72Direction, aj as RuleOf72Result, ak as SavingsGoalInput, al as SavingsGoalMode, am as SavingsGoalResult, an as SemverVersion, ao as SimpleInterestResult, ap as SubnetInfo, aq as SuccessiveDiscountResult, ar as SuccessiveDiscountStep, as as TaxDirection, at as TaxResult, au as TimeValueDirection, av as TimeValueResult, aw as TipSplitResult, ax as USD_DENOMINATIONS, ay as UnitPriceItem, az as UnitPriceResult, aA as UtilizationTier, aB as VideoBitrateInput, aC as VideoBitrateMode, aD as VideoBitrateResult, aE as ViewportConvertResult, aF as applySuccessiveDiscounts, aG as autoFormat, aH as bumpVersion, aI as calcAspectRatio, aJ as calcSubnet, aK as calculateBreakEven, aL as calculateCashBreakdown, aM as calculateCashRounding, aN as calculateCdMaturity, aO as calculateChange, aP as calculateCompoundInterest, aQ as calculateCreditUtilization, aR as calculateDepreciationSchedule, aS as calculateDiscount, aT as calculateEmi, aU as calculateGpa, aV as calculateLoan, aW as calculateMarginMarkup, aX as calculateMovingAverages, aY as calculatePaybackPeriod, aZ as calculatePercentageChange, a_ as calculateRoi, a$ as calculateRuleOf72, b0 as calculateSavingsGoal, b1 as calculateSimpleInterest, b2 as calculateTax, b3 as calculateTimeValue, b4 as calculateTipSplit, b5 as calculateVideoBitrate, b6 as compareSemver, b7 as compareUnitPrices, b8 as convert, b9 as convertAprApy, ba as convertBytes, bb as convertIp, bc as coverBox, bd as decimalToIp, be as decimalToIpCidr, bf as describePermissions, bg as fitIntoBox, bh as formatNumber, bi as formatValue, bj as formatVwValue, bk as formatWithSeparator, bl as gcd, bm as ipFromBinary, bn as ipFromDecimal, bo as ipFromHex, bp as ipToBinary, bq as ipToDecimal, br as ipToDecimalCidr, bs as ipToHex, bt as ipToOctal, bu as isValid, bv as isValidCidr, bw as isValidIp, bx as isValidIpv4, by as marginToMarkup, bz as markupToMargin, bA as octalToPermissions, bB as parseFileSize, bC as parseInput, bD as parseNumberString, bE as parseSemver, bF as permissionsToChmod, bG as permissionsToOctal, bH as permissionsToSymbolic, bI as ptToPx, bJ as pxToAll, bK as pxToViewport, bL as remToPx, bM as satisfiesRange, bN as scaleByHeight, bO as scaleByWidth, bP as sortVersions, bQ as splitSubnet, bR as symbolicToPermissions, bS as validateBarcode, bT as validateCardNumber, bU as validateIban, bV as validateIsbn, bW as viewportToPx } from '../units-p-1Ikx7l.js';
|
package/dist/tools/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, 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-NKN656TQ.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -964,6 +964,38 @@ interface GpaResult {
|
|
|
964
964
|
declare function calculateGpa(courses: GpaCourse[]): GpaResult | {
|
|
965
965
|
error: string;
|
|
966
966
|
};
|
|
967
|
+
type UtilizationTier = "excellent" | "good" | "fair" | "poor";
|
|
968
|
+
interface CreditAccountInput {
|
|
969
|
+
label?: string;
|
|
970
|
+
balance: number;
|
|
971
|
+
limit: number;
|
|
972
|
+
}
|
|
973
|
+
interface CreditAccountResult {
|
|
974
|
+
label: string;
|
|
975
|
+
balance: number;
|
|
976
|
+
limit: number;
|
|
977
|
+
utilizationPercent: number;
|
|
978
|
+
tier: UtilizationTier;
|
|
979
|
+
}
|
|
980
|
+
interface CreditUtilizationResult {
|
|
981
|
+
accounts: CreditAccountResult[];
|
|
982
|
+
totalBalance: number;
|
|
983
|
+
totalLimit: number;
|
|
984
|
+
overallUtilizationPercent: number;
|
|
985
|
+
overallTier: UtilizationTier;
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Compute per-account and overall credit utilization (balance / limit) from
|
|
989
|
+
* one or more credit accounts, plus a qualitative tier matching common
|
|
990
|
+
* credit-scoring guidance: under 10% is excellent, under 30% is good
|
|
991
|
+
* (the generally recommended ceiling), under 50% is fair, and 50%+ is poor.
|
|
992
|
+
* Overall utilization is the sum of all balances over the sum of all
|
|
993
|
+
* limits, not an average of the per-account percentages, since that's how
|
|
994
|
+
* credit scoring models actually weight it.
|
|
995
|
+
*/
|
|
996
|
+
declare function calculateCreditUtilization(accounts: CreditAccountInput[]): CreditUtilizationResult | {
|
|
997
|
+
error: string;
|
|
998
|
+
};
|
|
967
999
|
|
|
968
1000
|
type units_AmortizationRow = AmortizationRow;
|
|
969
1001
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -997,6 +1029,9 @@ type units_CdMaturityResult = CdMaturityResult;
|
|
|
997
1029
|
type units_CompareUnitPricesResult = CompareUnitPricesResult;
|
|
998
1030
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
999
1031
|
type units_CompoundYearRow = CompoundYearRow;
|
|
1032
|
+
type units_CreditAccountInput = CreditAccountInput;
|
|
1033
|
+
type units_CreditAccountResult = CreditAccountResult;
|
|
1034
|
+
type units_CreditUtilizationResult = CreditUtilizationResult;
|
|
1000
1035
|
type units_DepreciationMethod = DepreciationMethod;
|
|
1001
1036
|
type units_DepreciationResult = DepreciationResult;
|
|
1002
1037
|
type units_DepreciationYear = DepreciationYear;
|
|
@@ -1051,6 +1086,7 @@ type units_TipSplitResult = TipSplitResult;
|
|
|
1051
1086
|
declare const units_USD_DENOMINATIONS: typeof USD_DENOMINATIONS;
|
|
1052
1087
|
type units_UnitPriceItem = UnitPriceItem;
|
|
1053
1088
|
type units_UnitPriceResult = UnitPriceResult;
|
|
1089
|
+
type units_UtilizationTier = UtilizationTier;
|
|
1054
1090
|
type units_VideoBitrateInput = VideoBitrateInput;
|
|
1055
1091
|
type units_VideoBitrateMode = VideoBitrateMode;
|
|
1056
1092
|
type units_VideoBitrateResult = VideoBitrateResult;
|
|
@@ -1066,6 +1102,7 @@ declare const units_calculateCashRounding: typeof calculateCashRounding;
|
|
|
1066
1102
|
declare const units_calculateCdMaturity: typeof calculateCdMaturity;
|
|
1067
1103
|
declare const units_calculateChange: typeof calculateChange;
|
|
1068
1104
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
1105
|
+
declare const units_calculateCreditUtilization: typeof calculateCreditUtilization;
|
|
1069
1106
|
declare const units_calculateDepreciationSchedule: typeof calculateDepreciationSchedule;
|
|
1070
1107
|
declare const units_calculateDiscount: typeof calculateDiscount;
|
|
1071
1108
|
declare const units_calculateEmi: typeof calculateEmi;
|
|
@@ -1137,7 +1174,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1137
1174
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1138
1175
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1139
1176
|
declare namespace units {
|
|
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 };
|
|
1177
|
+
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_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_UtilizationTier as UtilizationTier, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateCreditUtilization as calculateCreditUtilization, units_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 };
|
|
1141
1178
|
}
|
|
1142
1179
|
|
|
1143
|
-
export { type
|
|
1180
|
+
export { type IpConversion 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 CreditAccountInput as H, type CreditAccountResult as I, type CreditUtilizationResult as J, type DepreciationMethod as K, type DepreciationResult as L, type DepreciationYear as M, type Dimensions as N, type DiscountField as O, type DiscountInput as P, type DiscountResult as Q, type EmiResult as R, type EmiTenureUnit as S, type EmiYearlyBreakdownRow as T, type FilePermissions as U, type FormatOptions as V, GPA_GRADE_POINTS as W, type GpaCourse as X, type GpaCourseResult as Y, type GpaResult as Z, type IbanValidationResult as _, type AprApyDirection as a, calculateRuleOf72 as a$, type IsbnFormat as a0, type IsbnResult as a1, type LoanResult as a2, type MarginMarkupField as a3, type MarginMarkupInput as a4, type MarginMarkupResult as a5, type MovingAveragePoint as a6, type MovingAverageResult as a7, type NotationStyle as a8, type NumberBase as a9, type UtilizationTier as aA, type VideoBitrateInput as aB, type VideoBitrateMode as aC, type VideoBitrateResult as aD, type ViewportConvertResult as aE, applySuccessiveDiscounts as aF, autoFormat as aG, bumpVersion as aH, calcAspectRatio as aI, calcSubnet as aJ, calculateBreakEven as aK, calculateCashBreakdown as aL, calculateCashRounding as aM, calculateCdMaturity as aN, calculateChange as aO, calculateCompoundInterest as aP, calculateCreditUtilization as aQ, calculateDepreciationSchedule as aR, calculateDiscount as aS, calculateEmi as aT, calculateGpa as aU, calculateLoan as aV, calculateMarginMarkup as aW, calculateMovingAverages as aX, calculatePaybackPeriod as aY, calculatePercentageChange as aZ, calculateRoi as a_, type PaybackPeriodInput as aa, type PaybackPeriodResult as ab, type PercentChangeDirection as ac, type PercentageChangeResult as ad, type Permission as ae, type PxConvertResult as af, type RoiInput as ag, type RoiResult as ah, type RuleOf72Direction as ai, type RuleOf72Result as aj, type SavingsGoalInput as ak, type SavingsGoalMode as al, type SavingsGoalResult as am, type SemverVersion as an, type SimpleInterestResult as ao, type SubnetInfo as ap, type SuccessiveDiscountResult as aq, type SuccessiveDiscountStep as ar, type TaxDirection as as, type TaxResult as at, type TimeValueDirection as au, type TimeValueResult as av, type TipSplitResult as aw, USD_DENOMINATIONS as ax, type UnitPriceItem as ay, type UnitPriceResult as az, type AprApyResult as b, calculateSavingsGoal as b0, calculateSimpleInterest as b1, calculateTax as b2, calculateTimeValue as b3, calculateTipSplit as b4, calculateVideoBitrate as b5, compareSemver as b6, compareUnitPrices as b7, convert as b8, convertAprApy as b9, octalToPermissions as bA, parseFileSize as bB, parseInput as bC, parseNumberString as bD, parseSemver as bE, permissionsToChmod as bF, permissionsToOctal as bG, permissionsToSymbolic as bH, ptToPx as bI, pxToAll as bJ, pxToViewport as bK, remToPx as bL, satisfiesRange as bM, scaleByHeight as bN, scaleByWidth as bO, sortVersions as bP, splitSubnet as bQ, symbolicToPermissions as bR, validateBarcode as bS, validateCardNumber as bT, validateIban as bU, validateIsbn as bV, viewportToPx as bW, convertBytes as ba, convertIp as bb, coverBox as bc, decimalToIp as bd, decimalToIpCidr as be, describePermissions as bf, fitIntoBox as bg, formatNumber as bh, formatValue as bi, formatVwValue as bj, formatWithSeparator as bk, gcd as bl, ipFromBinary as bm, ipFromDecimal as bn, ipFromHex as bo, ipToBinary as bp, ipToDecimal as bq, ipToDecimalCidr as br, ipToHex as bs, ipToOctal as bt, isValid as bu, isValidCidr as bv, isValidIp as bw, isValidIpv4 as bx, marginToMarkup as by, markupToMargin 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 };
|
|
@@ -964,6 +964,38 @@ interface GpaResult {
|
|
|
964
964
|
declare function calculateGpa(courses: GpaCourse[]): GpaResult | {
|
|
965
965
|
error: string;
|
|
966
966
|
};
|
|
967
|
+
type UtilizationTier = "excellent" | "good" | "fair" | "poor";
|
|
968
|
+
interface CreditAccountInput {
|
|
969
|
+
label?: string;
|
|
970
|
+
balance: number;
|
|
971
|
+
limit: number;
|
|
972
|
+
}
|
|
973
|
+
interface CreditAccountResult {
|
|
974
|
+
label: string;
|
|
975
|
+
balance: number;
|
|
976
|
+
limit: number;
|
|
977
|
+
utilizationPercent: number;
|
|
978
|
+
tier: UtilizationTier;
|
|
979
|
+
}
|
|
980
|
+
interface CreditUtilizationResult {
|
|
981
|
+
accounts: CreditAccountResult[];
|
|
982
|
+
totalBalance: number;
|
|
983
|
+
totalLimit: number;
|
|
984
|
+
overallUtilizationPercent: number;
|
|
985
|
+
overallTier: UtilizationTier;
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Compute per-account and overall credit utilization (balance / limit) from
|
|
989
|
+
* one or more credit accounts, plus a qualitative tier matching common
|
|
990
|
+
* credit-scoring guidance: under 10% is excellent, under 30% is good
|
|
991
|
+
* (the generally recommended ceiling), under 50% is fair, and 50%+ is poor.
|
|
992
|
+
* Overall utilization is the sum of all balances over the sum of all
|
|
993
|
+
* limits, not an average of the per-account percentages, since that's how
|
|
994
|
+
* credit scoring models actually weight it.
|
|
995
|
+
*/
|
|
996
|
+
declare function calculateCreditUtilization(accounts: CreditAccountInput[]): CreditUtilizationResult | {
|
|
997
|
+
error: string;
|
|
998
|
+
};
|
|
967
999
|
|
|
968
1000
|
type units_AmortizationRow = AmortizationRow;
|
|
969
1001
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -997,6 +1029,9 @@ type units_CdMaturityResult = CdMaturityResult;
|
|
|
997
1029
|
type units_CompareUnitPricesResult = CompareUnitPricesResult;
|
|
998
1030
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
999
1031
|
type units_CompoundYearRow = CompoundYearRow;
|
|
1032
|
+
type units_CreditAccountInput = CreditAccountInput;
|
|
1033
|
+
type units_CreditAccountResult = CreditAccountResult;
|
|
1034
|
+
type units_CreditUtilizationResult = CreditUtilizationResult;
|
|
1000
1035
|
type units_DepreciationMethod = DepreciationMethod;
|
|
1001
1036
|
type units_DepreciationResult = DepreciationResult;
|
|
1002
1037
|
type units_DepreciationYear = DepreciationYear;
|
|
@@ -1051,6 +1086,7 @@ type units_TipSplitResult = TipSplitResult;
|
|
|
1051
1086
|
declare const units_USD_DENOMINATIONS: typeof USD_DENOMINATIONS;
|
|
1052
1087
|
type units_UnitPriceItem = UnitPriceItem;
|
|
1053
1088
|
type units_UnitPriceResult = UnitPriceResult;
|
|
1089
|
+
type units_UtilizationTier = UtilizationTier;
|
|
1054
1090
|
type units_VideoBitrateInput = VideoBitrateInput;
|
|
1055
1091
|
type units_VideoBitrateMode = VideoBitrateMode;
|
|
1056
1092
|
type units_VideoBitrateResult = VideoBitrateResult;
|
|
@@ -1066,6 +1102,7 @@ declare const units_calculateCashRounding: typeof calculateCashRounding;
|
|
|
1066
1102
|
declare const units_calculateCdMaturity: typeof calculateCdMaturity;
|
|
1067
1103
|
declare const units_calculateChange: typeof calculateChange;
|
|
1068
1104
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
1105
|
+
declare const units_calculateCreditUtilization: typeof calculateCreditUtilization;
|
|
1069
1106
|
declare const units_calculateDepreciationSchedule: typeof calculateDepreciationSchedule;
|
|
1070
1107
|
declare const units_calculateDiscount: typeof calculateDiscount;
|
|
1071
1108
|
declare const units_calculateEmi: typeof calculateEmi;
|
|
@@ -1137,7 +1174,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
1137
1174
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
1138
1175
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
1139
1176
|
declare namespace units {
|
|
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 };
|
|
1177
|
+
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_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_UtilizationTier as UtilizationTier, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateCreditUtilization as calculateCreditUtilization, units_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 };
|
|
1141
1178
|
}
|
|
1142
1179
|
|
|
1143
|
-
export { type
|
|
1180
|
+
export { type IpConversion 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 CreditAccountInput as H, type CreditAccountResult as I, type CreditUtilizationResult as J, type DepreciationMethod as K, type DepreciationResult as L, type DepreciationYear as M, type Dimensions as N, type DiscountField as O, type DiscountInput as P, type DiscountResult as Q, type EmiResult as R, type EmiTenureUnit as S, type EmiYearlyBreakdownRow as T, type FilePermissions as U, type FormatOptions as V, GPA_GRADE_POINTS as W, type GpaCourse as X, type GpaCourseResult as Y, type GpaResult as Z, type IbanValidationResult as _, type AprApyDirection as a, calculateRuleOf72 as a$, type IsbnFormat as a0, type IsbnResult as a1, type LoanResult as a2, type MarginMarkupField as a3, type MarginMarkupInput as a4, type MarginMarkupResult as a5, type MovingAveragePoint as a6, type MovingAverageResult as a7, type NotationStyle as a8, type NumberBase as a9, type UtilizationTier as aA, type VideoBitrateInput as aB, type VideoBitrateMode as aC, type VideoBitrateResult as aD, type ViewportConvertResult as aE, applySuccessiveDiscounts as aF, autoFormat as aG, bumpVersion as aH, calcAspectRatio as aI, calcSubnet as aJ, calculateBreakEven as aK, calculateCashBreakdown as aL, calculateCashRounding as aM, calculateCdMaturity as aN, calculateChange as aO, calculateCompoundInterest as aP, calculateCreditUtilization as aQ, calculateDepreciationSchedule as aR, calculateDiscount as aS, calculateEmi as aT, calculateGpa as aU, calculateLoan as aV, calculateMarginMarkup as aW, calculateMovingAverages as aX, calculatePaybackPeriod as aY, calculatePercentageChange as aZ, calculateRoi as a_, type PaybackPeriodInput as aa, type PaybackPeriodResult as ab, type PercentChangeDirection as ac, type PercentageChangeResult as ad, type Permission as ae, type PxConvertResult as af, type RoiInput as ag, type RoiResult as ah, type RuleOf72Direction as ai, type RuleOf72Result as aj, type SavingsGoalInput as ak, type SavingsGoalMode as al, type SavingsGoalResult as am, type SemverVersion as an, type SimpleInterestResult as ao, type SubnetInfo as ap, type SuccessiveDiscountResult as aq, type SuccessiveDiscountStep as ar, type TaxDirection as as, type TaxResult as at, type TimeValueDirection as au, type TimeValueResult as av, type TipSplitResult as aw, USD_DENOMINATIONS as ax, type UnitPriceItem as ay, type UnitPriceResult as az, type AprApyResult as b, calculateSavingsGoal as b0, calculateSimpleInterest as b1, calculateTax as b2, calculateTimeValue as b3, calculateTipSplit as b4, calculateVideoBitrate as b5, compareSemver as b6, compareUnitPrices as b7, convert as b8, convertAprApy as b9, octalToPermissions as bA, parseFileSize as bB, parseInput as bC, parseNumberString as bD, parseSemver as bE, permissionsToChmod as bF, permissionsToOctal as bG, permissionsToSymbolic as bH, ptToPx as bI, pxToAll as bJ, pxToViewport as bK, remToPx as bL, satisfiesRange as bM, scaleByHeight as bN, scaleByWidth as bO, sortVersions as bP, splitSubnet as bQ, symbolicToPermissions as bR, validateBarcode as bS, validateCardNumber as bT, validateIban as bU, validateIsbn as bV, viewportToPx as bW, convertBytes as ba, convertIp as bb, coverBox as bc, decimalToIp as bd, decimalToIpCidr as be, describePermissions as bf, fitIntoBox as bg, formatNumber as bh, formatValue as bi, formatVwValue as bj, formatWithSeparator as bk, gcd as bl, ipFromBinary as bm, ipFromDecimal as bn, ipFromHex as bo, ipToBinary as bp, ipToDecimal as bq, ipToDecimalCidr as br, ipToHex as bs, ipToOctal as bt, isValid as bu, isValidCidr as bv, isValidIp as bw, isValidIpv4 as bx, marginToMarkup as by, markupToMargin 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.53.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",
|