@utilix-tech/sdk 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +21 -5
- package/dist/{chunk-7AJRK57W.js → chunk-47RI5V3B.js} +31 -1
- package/dist/{chunk-UTHAHRQ7.js → chunk-DBNTO3YO.js} +79 -1
- package/dist/{chunk-UUT5HNST.js → chunk-JL7YTXRB.js} +81 -1
- package/dist/{chunk-YEXQDI3J.js → chunk-RZUNTYEH.js} +40 -1
- package/dist/{code-BK-x8hVx.d.cts → code-KXoRsHtl.d.cts} +21 -2
- package/dist/{code-BK-x8hVx.d.ts → code-KXoRsHtl.d.ts} +21 -2
- package/dist/{data-CFeS9kes.d.cts → data-BCf3dm-E.d.cts} +28 -2
- package/dist/{data-CFeS9kes.d.ts → data-BCf3dm-E.d.ts} +28 -2
- package/dist/index.cjs +227 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/{network-X0EfH9Xq.d.cts → network-CnKUQT4g.d.cts} +36 -2
- package/dist/{network-X0EfH9Xq.d.ts → network-CnKUQT4g.d.ts} +36 -2
- package/dist/tools/code.cjs +80 -0
- package/dist/tools/code.d.cts +1 -1
- package/dist/tools/code.d.ts +1 -1
- package/dist/tools/code.js +1 -1
- package/dist/tools/data.cjs +39 -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/network.cjs +78 -0
- package/dist/tools/network.d.cts +1 -1
- package/dist/tools/network.d.ts +1 -1
- package/dist/tools/network.js +1 -1
- package/dist/tools/units.cjs +30 -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-c90DW-OZ.d.cts → units-HQrMCiNM.d.cts} +34 -2
- package/dist/{units-c90DW-OZ.d.ts → units-HQrMCiNM.d.ts} +34 -2
- package/package.json +1 -1
package/dist/tools/code.cjs
CHANGED
|
@@ -2807,6 +2807,85 @@ function lintConventionalCommit(message, options = {}) {
|
|
|
2807
2807
|
const valid = !findings.some((f) => f.severity === "error");
|
|
2808
2808
|
return { message, valid, parsed, findings };
|
|
2809
2809
|
}
|
|
2810
|
+
function globSegmentToRegexSource(segment) {
|
|
2811
|
+
let out = "";
|
|
2812
|
+
for (let i = 0; i < segment.length; i++) {
|
|
2813
|
+
const c = segment[i];
|
|
2814
|
+
if (c === "*") {
|
|
2815
|
+
out += "[^/]*";
|
|
2816
|
+
} else if (c === "?") {
|
|
2817
|
+
out += "[^/]";
|
|
2818
|
+
} else if (c === "[") {
|
|
2819
|
+
const close = segment.indexOf("]", i + 1);
|
|
2820
|
+
if (close === -1) {
|
|
2821
|
+
out += "\\[";
|
|
2822
|
+
} else {
|
|
2823
|
+
let cls = segment.slice(i + 1, close);
|
|
2824
|
+
if (cls.startsWith("!")) cls = "^" + cls.slice(1);
|
|
2825
|
+
out += `[${cls}]`;
|
|
2826
|
+
i = close;
|
|
2827
|
+
}
|
|
2828
|
+
} else {
|
|
2829
|
+
out += c.replace(/[.+^${}()|\\]/g, "\\$&");
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
return out;
|
|
2833
|
+
}
|
|
2834
|
+
function compileGitignorePattern(raw, line) {
|
|
2835
|
+
let pattern = raw.replace(/\s+$/, "");
|
|
2836
|
+
if (!pattern || pattern.startsWith("#")) return null;
|
|
2837
|
+
let negate = false;
|
|
2838
|
+
if (pattern.startsWith("!")) {
|
|
2839
|
+
negate = true;
|
|
2840
|
+
pattern = pattern.slice(1);
|
|
2841
|
+
}
|
|
2842
|
+
pattern = pattern.replace(/\\(.)/g, "$1");
|
|
2843
|
+
if (!pattern) return null;
|
|
2844
|
+
const dirOnly = pattern.endsWith("/") && !pattern.endsWith("\\/");
|
|
2845
|
+
if (dirOnly) pattern = pattern.slice(0, -1);
|
|
2846
|
+
const hasLeadingSlash = pattern.startsWith("/");
|
|
2847
|
+
if (hasLeadingSlash) pattern = pattern.slice(1);
|
|
2848
|
+
const anchored = hasLeadingSlash || pattern.includes("/");
|
|
2849
|
+
const segments = pattern.split("/");
|
|
2850
|
+
const regexParts = segments.map((seg) => {
|
|
2851
|
+
if (seg === "**") return "(?:.*)";
|
|
2852
|
+
return globSegmentToRegexSource(seg);
|
|
2853
|
+
});
|
|
2854
|
+
let body = regexParts.join("/");
|
|
2855
|
+
body = body.replace(/\(\?:\.\*\)\//g, "(?:.*/)?").replace(/\/\(\?:\.\*\)/g, "(?:/.*)?");
|
|
2856
|
+
const prefix = anchored ? "^" : "^(?:.*/)?";
|
|
2857
|
+
const suffix = "(?:/.*)?$";
|
|
2858
|
+
const regex = new RegExp(prefix + body + suffix);
|
|
2859
|
+
return { raw, line, negate, regex };
|
|
2860
|
+
}
|
|
2861
|
+
function testGitignorePatterns(gitignoreContent, paths) {
|
|
2862
|
+
if (typeof gitignoreContent !== "string" || !gitignoreContent.trim()) {
|
|
2863
|
+
return { error: "gitignore content is required" };
|
|
2864
|
+
}
|
|
2865
|
+
if (!Array.isArray(paths) || paths.length === 0) {
|
|
2866
|
+
return { error: "At least one path is required" };
|
|
2867
|
+
}
|
|
2868
|
+
const lines = gitignoreContent.split("\n");
|
|
2869
|
+
const patterns = [];
|
|
2870
|
+
lines.forEach((line, idx) => {
|
|
2871
|
+
const compiled = compileGitignorePattern(line, idx + 1);
|
|
2872
|
+
if (compiled) patterns.push(compiled);
|
|
2873
|
+
});
|
|
2874
|
+
return paths.map((rawPath) => {
|
|
2875
|
+
const path = rawPath.trim().replace(/^\.\//, "");
|
|
2876
|
+
let ignored = false;
|
|
2877
|
+
let matchedPattern = null;
|
|
2878
|
+
let matchedLine = null;
|
|
2879
|
+
for (const p of patterns) {
|
|
2880
|
+
if (p.regex.test(path)) {
|
|
2881
|
+
ignored = !p.negate;
|
|
2882
|
+
matchedPattern = p.raw.trim();
|
|
2883
|
+
matchedLine = p.line;
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
return { path, ignored, matchedPattern, matchedLine };
|
|
2887
|
+
});
|
|
2888
|
+
}
|
|
2810
2889
|
|
|
2811
2890
|
exports.ALL_FLAGS = ALL_FLAGS;
|
|
2812
2891
|
exports.CHEATSHEET = CHEATSHEET;
|
|
@@ -2856,6 +2935,7 @@ exports.removeRedundantAttributes = removeRedundantAttributes;
|
|
|
2856
2935
|
exports.searchCheatsheet = searchCheatsheet;
|
|
2857
2936
|
exports.searchEndpoints = searchEndpoints;
|
|
2858
2937
|
exports.splitStatements = splitStatements;
|
|
2938
|
+
exports.testGitignorePatterns = testGitignorePatterns;
|
|
2859
2939
|
exports.testPattern = testPattern;
|
|
2860
2940
|
exports.testRegex = testRegex;
|
|
2861
2941
|
exports.validateEnvKey = validateEnvKey;
|
package/dist/tools/code.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, C as CHEATSHEET, d as CheatsheetEntry, e as ConventionalCommitFinding, f as ConventionalCommitFooter, g as ConventionalCommitOptions, h as ConventionalCommitParsed, i as ConventionalCommitResult, j as ConventionalCommitSeverity, k as CssResult, D as DEFAULT_COMMIT_TYPES, l as DockerImageRef, E as EnvEntry, m as EnvParseResult, G as GitCommandConfig, n as GitCommandResult, o as GitOperation, p as GithubUrlInfo, q as GithubUrlType, r as GqlFormatResult, H as HtmlFormatResult,
|
|
1
|
+
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, C as CHEATSHEET, d as CheatsheetEntry, e as ConventionalCommitFinding, f as ConventionalCommitFooter, g as ConventionalCommitOptions, h as ConventionalCommitParsed, i as ConventionalCommitResult, j as ConventionalCommitSeverity, k as CssResult, D as DEFAULT_COMMIT_TYPES, l as DockerImageRef, E as EnvEntry, m as EnvParseResult, G as GitCommandConfig, n as GitCommandResult, o as GitOperation, p as GithubUrlInfo, q as GithubUrlType, r as GitignoreTestResult, s as GqlFormatResult, H as HtmlFormatResult, t as HtmlMinifyOptions, u as HtmlMinifyResult, J as JsMinifyOptions, v as JsMinifyResult, M as MIME_TABLE, w as MatchResult, x as MimeEntry, y as MimeLookupResult, O as OPERATIONS, P as ParsedSpec, R as RedosFinding, z as RedosResult, B as RedosSeverity, F as RegexError, I as RegexFlag, K as RegexMatch, L as RegexResult, N as RegexSuccess, S as SQL_DEFAULT_OPTIONS, Q as Segment, T as SpecVersion, U as SqlDialect, V as SqlFormatOptions, W as TestPatternResult, X as buildDockerPull, Y as buildDockerRun, Z as buildGitCommand, _ as collapseHtmlWhitespace, $ as collapseJsWhitespace, a0 as countProperties, a1 as countRules, a2 as detectDialect, a3 as detectOperationType, a4 as detectRedos, a5 as envToExport, a6 as envToJson, a7 as formatCss, a8 as formatGql, a9 as formatHtml, aa as formatSql, ab as getEndpointsByTag, ac as getHtmlStats, ad as getJsStats, ae as getMethodColor, af as isValidTag, ag as lintConventionalCommit, ah as lookupMime, ai as minifyCss, aj as minifyGql, ak as minifyHtml, al as minifyJs, am as minifySql, an as normalizeRef, ao as parseDockerImage, ap as parseEnv, aq as parseGitCommand, ar as parseGithubUrl, as as parseSpec, at as removeConsoleCalls, au as removeEmptyAttributes, av as removeHtmlComments, aw as removeJsComments, ax as removeRedundantAttributes, ay as searchCheatsheet, az as searchEndpoints, aA as splitStatements, aB as testGitignorePatterns, aC as testPattern, aD as testRegex, aE as validateEnvKey } from '../code-KXoRsHtl.cjs';
|
package/dist/tools/code.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, C as CHEATSHEET, d as CheatsheetEntry, e as ConventionalCommitFinding, f as ConventionalCommitFooter, g as ConventionalCommitOptions, h as ConventionalCommitParsed, i as ConventionalCommitResult, j as ConventionalCommitSeverity, k as CssResult, D as DEFAULT_COMMIT_TYPES, l as DockerImageRef, E as EnvEntry, m as EnvParseResult, G as GitCommandConfig, n as GitCommandResult, o as GitOperation, p as GithubUrlInfo, q as GithubUrlType, r as GqlFormatResult, H as HtmlFormatResult,
|
|
1
|
+
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, C as CHEATSHEET, d as CheatsheetEntry, e as ConventionalCommitFinding, f as ConventionalCommitFooter, g as ConventionalCommitOptions, h as ConventionalCommitParsed, i as ConventionalCommitResult, j as ConventionalCommitSeverity, k as CssResult, D as DEFAULT_COMMIT_TYPES, l as DockerImageRef, E as EnvEntry, m as EnvParseResult, G as GitCommandConfig, n as GitCommandResult, o as GitOperation, p as GithubUrlInfo, q as GithubUrlType, r as GitignoreTestResult, s as GqlFormatResult, H as HtmlFormatResult, t as HtmlMinifyOptions, u as HtmlMinifyResult, J as JsMinifyOptions, v as JsMinifyResult, M as MIME_TABLE, w as MatchResult, x as MimeEntry, y as MimeLookupResult, O as OPERATIONS, P as ParsedSpec, R as RedosFinding, z as RedosResult, B as RedosSeverity, F as RegexError, I as RegexFlag, K as RegexMatch, L as RegexResult, N as RegexSuccess, S as SQL_DEFAULT_OPTIONS, Q as Segment, T as SpecVersion, U as SqlDialect, V as SqlFormatOptions, W as TestPatternResult, X as buildDockerPull, Y as buildDockerRun, Z as buildGitCommand, _ as collapseHtmlWhitespace, $ as collapseJsWhitespace, a0 as countProperties, a1 as countRules, a2 as detectDialect, a3 as detectOperationType, a4 as detectRedos, a5 as envToExport, a6 as envToJson, a7 as formatCss, a8 as formatGql, a9 as formatHtml, aa as formatSql, ab as getEndpointsByTag, ac as getHtmlStats, ad as getJsStats, ae as getMethodColor, af as isValidTag, ag as lintConventionalCommit, ah as lookupMime, ai as minifyCss, aj as minifyGql, ak as minifyHtml, al as minifyJs, am as minifySql, an as normalizeRef, ao as parseDockerImage, ap as parseEnv, aq as parseGitCommand, ar as parseGithubUrl, as as parseSpec, at as removeConsoleCalls, au as removeEmptyAttributes, av as removeHtmlComments, aw as removeJsComments, ax as removeRedundantAttributes, ay as searchCheatsheet, az as searchEndpoints, aA as splitStatements, aB as testGitignorePatterns, aC as testPattern, aD as testRegex, aE as validateEnvKey } from '../code-KXoRsHtl.js';
|
package/dist/tools/code.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testPattern, testRegex, validateEnvKey } from '../chunk-
|
|
1
|
+
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateEnvKey } from '../chunk-JL7YTXRB.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/data.cjs
CHANGED
|
@@ -1434,9 +1434,48 @@ function generateMarkdownToc(markdown, options = {}) {
|
|
|
1434
1434
|
});
|
|
1435
1435
|
return { toc: tocLines.join("\n"), entries };
|
|
1436
1436
|
}
|
|
1437
|
+
function quoteSqlIdentifier(name, dialect) {
|
|
1438
|
+
if (dialect === "mysql") return "`" + name.replace(/`/g, "``") + "`";
|
|
1439
|
+
return '"' + name.replace(/"/g, '""') + '"';
|
|
1440
|
+
}
|
|
1441
|
+
function formatSqlValue(raw) {
|
|
1442
|
+
const trimmed = raw.trim();
|
|
1443
|
+
if (trimmed === "") return "NULL";
|
|
1444
|
+
if (/^-?\d+(\.\d+)?$/.test(trimmed)) return trimmed;
|
|
1445
|
+
if (/^(true|false)$/i.test(trimmed)) return trimmed.toLowerCase();
|
|
1446
|
+
return "'" + trimmed.replace(/'/g, "''") + "'";
|
|
1447
|
+
}
|
|
1448
|
+
function csvToSqlInsert(input, options) {
|
|
1449
|
+
const parsed = parseCsv(input);
|
|
1450
|
+
if ("error" in parsed) return parsed;
|
|
1451
|
+
const tableName = options?.tableName?.trim() || "my_table";
|
|
1452
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(tableName)) {
|
|
1453
|
+
return { error: "tableName must start with a letter or underscore and contain only letters, digits, and underscores" };
|
|
1454
|
+
}
|
|
1455
|
+
const dialect = options?.dialect === "mysql" ? "mysql" : "ansi";
|
|
1456
|
+
const batchSize = options?.batchSize !== void 0 && Number.isFinite(options.batchSize) && options.batchSize > 0 ? Math.floor(options.batchSize) : 1;
|
|
1457
|
+
const columns = parsed.headers.map((h) => h.trim());
|
|
1458
|
+
const quotedTable = quoteSqlIdentifier(tableName, dialect);
|
|
1459
|
+
const quotedColumns = columns.map((c) => quoteSqlIdentifier(c, dialect)).join(", ");
|
|
1460
|
+
const statements = [];
|
|
1461
|
+
for (let i = 0; i < parsed.rows.length; i += batchSize) {
|
|
1462
|
+
const batch = parsed.rows.slice(i, i + batchSize);
|
|
1463
|
+
const tuples = batch.map(
|
|
1464
|
+
(row) => "(" + columns.map((_, idx) => formatSqlValue(row[idx] ?? "")).join(", ") + ")"
|
|
1465
|
+
);
|
|
1466
|
+
statements.push(`INSERT INTO ${quotedTable} (${quotedColumns}) VALUES ${tuples.join(", ")};`);
|
|
1467
|
+
}
|
|
1468
|
+
return {
|
|
1469
|
+
sql: statements.join("\n"),
|
|
1470
|
+
rowCount: parsed.rows.length,
|
|
1471
|
+
columnCount: columns.length,
|
|
1472
|
+
columns
|
|
1473
|
+
};
|
|
1474
|
+
}
|
|
1437
1475
|
|
|
1438
1476
|
exports.convertSubtitles = convertSubtitles;
|
|
1439
1477
|
exports.csvToJson = csvToJson;
|
|
1478
|
+
exports.csvToSqlInsert = csvToSqlInsert;
|
|
1440
1479
|
exports.detectDelimiter = detectDelimiter;
|
|
1441
1480
|
exports.detectSubtitleFormat = detectSubtitleFormat;
|
|
1442
1481
|
exports.diffEnvExample = diffEnvExample;
|
package/dist/tools/data.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as ConvertedSubtitles, a as CsvParseResult, E as EnvDiffError,
|
|
1
|
+
export { C as ConvertedSubtitles, a as CsvParseResult, b as CsvToSqlOptions, c as CsvToSqlResult, E as EnvDiffError, e as EnvDiffResult, f as EnvEntry, g as EnvParseResult, F as FrontMatterError, h as FrontMatterResult, I as IniSection, M as MarkdownTocEntry, i as MarkdownTocOptions, j as MarkdownTocResult, N as NdjsonLineResult, k as NdjsonValidateResult, P as ParseOptions, l as ParsedIni, m as ParsedSubtitles, S as SubtitleCue, n as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, o as XmlToJsonOptions, p as convertSubtitles, q as csvToJson, r as csvToSqlInsert, s as detectDelimiter, t as detectSubtitleFormat, u as diffEnvExample, v as envToExport, w as envToJson, x as formatNdjson, y as formatSubtitleTimestamp, z as formatToml, A as formatXml, B as generateMarkdownToc, D as getSection, G as getSectionNames, H as getTomlStats, J as getXmlStats, K as getYamlStats, L as iniToJson, O as jsonArrayToNdjson, Q as jsonToIni, R as jsonToToml, U as jsonToXml, W as minifyNdjson, Y as minifyToml, Z as minifyXml, _ as ndjsonToJsonArray, $ as parseCsv, a0 as parseEnv, a1 as parseFrontMatter, a2 as parseIni, a3 as parseSubtitleTimestamp, a4 as parseSubtitles, a5 as parseXmlToObject, a6 as serializeSubtitles, a7 as shiftSubtitles, a8 as stringifyIni, a9 as toCsvString, aa as tomlToJson, ab as validateEnvKey, ac as validateIni, ad as validateNdjson, ae as validateToml, af as validateXml, ag as validateYaml, ah as xmlToJson } from '../data-BCf3dm-E.cjs';
|
package/dist/tools/data.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as ConvertedSubtitles, a as CsvParseResult, E as EnvDiffError,
|
|
1
|
+
export { C as ConvertedSubtitles, a as CsvParseResult, b as CsvToSqlOptions, c as CsvToSqlResult, E as EnvDiffError, e as EnvDiffResult, f as EnvEntry, g as EnvParseResult, F as FrontMatterError, h as FrontMatterResult, I as IniSection, M as MarkdownTocEntry, i as MarkdownTocOptions, j as MarkdownTocResult, N as NdjsonLineResult, k as NdjsonValidateResult, P as ParseOptions, l as ParsedIni, m as ParsedSubtitles, S as SubtitleCue, n as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, o as XmlToJsonOptions, p as convertSubtitles, q as csvToJson, r as csvToSqlInsert, s as detectDelimiter, t as detectSubtitleFormat, u as diffEnvExample, v as envToExport, w as envToJson, x as formatNdjson, y as formatSubtitleTimestamp, z as formatToml, A as formatXml, B as generateMarkdownToc, D as getSection, G as getSectionNames, H as getTomlStats, J as getXmlStats, K as getYamlStats, L as iniToJson, O as jsonArrayToNdjson, Q as jsonToIni, R as jsonToToml, U as jsonToXml, W as minifyNdjson, Y as minifyToml, Z as minifyXml, _ as ndjsonToJsonArray, $ as parseCsv, a0 as parseEnv, a1 as parseFrontMatter, a2 as parseIni, a3 as parseSubtitleTimestamp, a4 as parseSubtitles, a5 as parseXmlToObject, a6 as serializeSubtitles, a7 as shiftSubtitles, a8 as stringifyIni, a9 as toCsvString, aa as tomlToJson, ab as validateEnvKey, ac as validateIni, ad as validateNdjson, ae as validateToml, af as validateXml, ag as validateYaml, ah as xmlToJson } from '../data-BCf3dm-E.js';
|
package/dist/tools/data.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { convertSubtitles, csvToJson, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, 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, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson } from '../chunk-
|
|
1
|
+
export { convertSubtitles, csvToJson, csvToSqlInsert, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, 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, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson } from '../chunk-RZUNTYEH.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/network.cjs
CHANGED
|
@@ -2010,6 +2010,83 @@ function parseIpv6Address(input) {
|
|
|
2010
2010
|
addressType: classifyIpv6(expandedGroups)
|
|
2011
2011
|
};
|
|
2012
2012
|
}
|
|
2013
|
+
var MAX_COOKIE_AGE_SECONDS = 400 * 24 * 60 * 60;
|
|
2014
|
+
function checkSetCookieHeader(header) {
|
|
2015
|
+
if (typeof header !== "string" || !header.trim()) {
|
|
2016
|
+
return { error: "A Set-Cookie header value is required" };
|
|
2017
|
+
}
|
|
2018
|
+
const parts = header.split(";").map((p) => p.trim()).filter(Boolean);
|
|
2019
|
+
const [nameValue, ...attrParts] = parts;
|
|
2020
|
+
const eqIdx = nameValue.indexOf("=");
|
|
2021
|
+
if (eqIdx === -1) return { error: "Missing name=value pair" };
|
|
2022
|
+
const name = nameValue.slice(0, eqIdx).trim();
|
|
2023
|
+
const value = nameValue.slice(eqIdx + 1).trim();
|
|
2024
|
+
if (!name) return { error: "Cookie name cannot be empty" };
|
|
2025
|
+
const cookie = {
|
|
2026
|
+
name,
|
|
2027
|
+
value,
|
|
2028
|
+
domain: null,
|
|
2029
|
+
path: null,
|
|
2030
|
+
expires: null,
|
|
2031
|
+
maxAge: null,
|
|
2032
|
+
secure: false,
|
|
2033
|
+
httpOnly: false,
|
|
2034
|
+
sameSite: null
|
|
2035
|
+
};
|
|
2036
|
+
for (const attr of attrParts) {
|
|
2037
|
+
const idx = attr.indexOf("=");
|
|
2038
|
+
const key = (idx === -1 ? attr : attr.slice(0, idx)).trim().toLowerCase();
|
|
2039
|
+
const val = idx === -1 ? "" : attr.slice(idx + 1).trim();
|
|
2040
|
+
switch (key) {
|
|
2041
|
+
case "domain":
|
|
2042
|
+
cookie.domain = val || null;
|
|
2043
|
+
break;
|
|
2044
|
+
case "path":
|
|
2045
|
+
cookie.path = val || null;
|
|
2046
|
+
break;
|
|
2047
|
+
case "expires":
|
|
2048
|
+
cookie.expires = val || null;
|
|
2049
|
+
break;
|
|
2050
|
+
case "max-age": {
|
|
2051
|
+
const n = Number(val);
|
|
2052
|
+
cookie.maxAge = Number.isFinite(n) ? n : null;
|
|
2053
|
+
break;
|
|
2054
|
+
}
|
|
2055
|
+
case "secure":
|
|
2056
|
+
cookie.secure = true;
|
|
2057
|
+
break;
|
|
2058
|
+
case "httponly":
|
|
2059
|
+
cookie.httpOnly = true;
|
|
2060
|
+
break;
|
|
2061
|
+
case "samesite": {
|
|
2062
|
+
const normalized = val.toLowerCase();
|
|
2063
|
+
if (normalized === "strict") cookie.sameSite = "Strict";
|
|
2064
|
+
else if (normalized === "lax") cookie.sameSite = "Lax";
|
|
2065
|
+
else if (normalized === "none") cookie.sameSite = "None";
|
|
2066
|
+
break;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
const issues = [];
|
|
2071
|
+
const warnings = [];
|
|
2072
|
+
if (cookie.sameSite === "None" && !cookie.secure) {
|
|
2073
|
+
issues.push("SameSite=None requires the Secure attribute \u2014 modern browsers reject this cookie without it.");
|
|
2074
|
+
}
|
|
2075
|
+
if (name.startsWith("__Host-")) {
|
|
2076
|
+
if (!cookie.secure) issues.push("__Host- prefixed cookies require the Secure attribute.");
|
|
2077
|
+
if (cookie.domain) issues.push("__Host- prefixed cookies must not set a Domain attribute.");
|
|
2078
|
+
if (cookie.path !== "/") issues.push("__Host- prefixed cookies must set Path=/.");
|
|
2079
|
+
} else if (name.startsWith("__Secure-")) {
|
|
2080
|
+
if (!cookie.secure) issues.push("__Secure- prefixed cookies require the Secure attribute.");
|
|
2081
|
+
}
|
|
2082
|
+
if (!cookie.secure) {
|
|
2083
|
+
warnings.push("Missing Secure attribute \u2014 the cookie can be sent over a plain HTTP connection.");
|
|
2084
|
+
}
|
|
2085
|
+
if (cookie.maxAge !== null && cookie.maxAge > MAX_COOKIE_AGE_SECONDS) {
|
|
2086
|
+
warnings.push(`Max-Age (${cookie.maxAge}s) exceeds 400 days \u2014 Chromium-based browsers clamp cookie expiry to 400 days from when it's set, so this will be shortened.`);
|
|
2087
|
+
}
|
|
2088
|
+
return { cookie, issues, warnings, valid: issues.length === 0 };
|
|
2089
|
+
}
|
|
2013
2090
|
|
|
2014
2091
|
exports.DNS_RECORD_TYPES = DNS_RECORD_TYPES;
|
|
2015
2092
|
exports.HTTP_HEADERS = HTTP_HEADERS;
|
|
@@ -2022,6 +2099,7 @@ exports.buildGeoUrl = buildGeoUrl;
|
|
|
2022
2099
|
exports.buildLinkHeader = buildLinkHeader;
|
|
2023
2100
|
exports.buildMapUrl = buildMapUrl;
|
|
2024
2101
|
exports.buildReferrerPolicy = buildReferrerPolicy;
|
|
2102
|
+
exports.checkSetCookieHeader = checkSetCookieHeader;
|
|
2025
2103
|
exports.countryCodeToFlag = countryCodeToFlag;
|
|
2026
2104
|
exports.formatCoordinates = formatCoordinates;
|
|
2027
2105
|
exports.formatTtl = formatTtl;
|
package/dist/tools/network.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CacheControlDirective, a as CacheControlOptions, b as CacheControlResult, D as DNS_RECORD_TYPES,
|
|
1
|
+
export { C as CacheControlDirective, a as CacheControlOptions, b as CacheControlResult, c as CookieAttributes, d as CookieCheckResult, D as DNS_RECORD_TYPES, e as DnsRecord, f as DnsRecordType, g as DnsResponse, G as GeoResult, H as HTTP_HEADERS, h as HarEntry, i as HarParseResult, j as HarSummary, k as HeaderCategory, l as HttpHeader, I as Ipv6AddressType, m as Ipv6ParseResult, L as LINK_REL_VALUES, o as LinkHeaderEntry, p as LinkHeaderEntryInput, q as LinkHeaderResult, r as LinkRel, P as ParsedDnsResult, s as ParsedGeoResult, R as REFERRER_POLICY_VALUES, t as ReferrerPolicyEntry, u as ReferrerPolicyResult, v as ReferrerPolicyValue, w as RobotsGroup, x as RobotsIssue, y as RobotsRule, z as RobotsValidationResult, S as STATUS_CODES, A as SameSiteValue, B as SitemapIndexEntry, E as SitemapIssue, F as SitemapUrlEntry, J as SitemapValidationResult, K as StatusCode, U as UaDeviceType, M as UserAgentInfo, N as buildCacheControl, O as buildDnsQueryUrl, Q as buildGeoUrl, T as buildLinkHeader, V as buildMapUrl, W as buildReferrerPolicy, X as checkSetCookieHeader, Y as countryCodeToFlag, Z as formatCoordinates, _ as formatTtl, $ as getByCategory, a0 as getHeader, a1 as getHeadersByCategory, a2 as getStatusByCategory, a3 as getStatusCode, a4 as isClientError, a5 as isServerError, a6 as isSuccess, a7 as isValidIp, a8 as isValidIpv4, a9 as isValidIpv6, aa as parseDnsResponse, ab as parseGeoResponse, ac as parseHar, ad as parseIpv6Address, ae as parseUserAgent, af as searchHeaders, ag as searchStatusCodes, ah as statusCodeToText, ai as typeNumberToLabel, aj as validateDomain, ak as validateHeaderName, al as validateHeaderValue, am as validateRobotsTxt, an as validateSitemap } from '../network-CnKUQT4g.cjs';
|
package/dist/tools/network.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CacheControlDirective, a as CacheControlOptions, b as CacheControlResult, D as DNS_RECORD_TYPES,
|
|
1
|
+
export { C as CacheControlDirective, a as CacheControlOptions, b as CacheControlResult, c as CookieAttributes, d as CookieCheckResult, D as DNS_RECORD_TYPES, e as DnsRecord, f as DnsRecordType, g as DnsResponse, G as GeoResult, H as HTTP_HEADERS, h as HarEntry, i as HarParseResult, j as HarSummary, k as HeaderCategory, l as HttpHeader, I as Ipv6AddressType, m as Ipv6ParseResult, L as LINK_REL_VALUES, o as LinkHeaderEntry, p as LinkHeaderEntryInput, q as LinkHeaderResult, r as LinkRel, P as ParsedDnsResult, s as ParsedGeoResult, R as REFERRER_POLICY_VALUES, t as ReferrerPolicyEntry, u as ReferrerPolicyResult, v as ReferrerPolicyValue, w as RobotsGroup, x as RobotsIssue, y as RobotsRule, z as RobotsValidationResult, S as STATUS_CODES, A as SameSiteValue, B as SitemapIndexEntry, E as SitemapIssue, F as SitemapUrlEntry, J as SitemapValidationResult, K as StatusCode, U as UaDeviceType, M as UserAgentInfo, N as buildCacheControl, O as buildDnsQueryUrl, Q as buildGeoUrl, T as buildLinkHeader, V as buildMapUrl, W as buildReferrerPolicy, X as checkSetCookieHeader, Y as countryCodeToFlag, Z as formatCoordinates, _ as formatTtl, $ as getByCategory, a0 as getHeader, a1 as getHeadersByCategory, a2 as getStatusByCategory, a3 as getStatusCode, a4 as isClientError, a5 as isServerError, a6 as isSuccess, a7 as isValidIp, a8 as isValidIpv4, a9 as isValidIpv6, aa as parseDnsResponse, ab as parseGeoResponse, ac as parseHar, ad as parseIpv6Address, ae as parseUserAgent, af as searchHeaders, ag as searchStatusCodes, ah as statusCodeToText, ai as typeNumberToLabel, aj as validateDomain, ak as validateHeaderName, al as validateHeaderValue, am as validateRobotsTxt, an as validateSitemap } from '../network-CnKUQT4g.js';
|
package/dist/tools/network.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, REFERRER_POLICY_VALUES, STATUS_CODES, buildCacheControl, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildReferrerPolicy, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parseUserAgent, searchHeaders, searchStatusCodes, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateRobotsTxt, validateSitemap } from '../chunk-
|
|
1
|
+
export { DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, REFERRER_POLICY_VALUES, STATUS_CODES, buildCacheControl, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildReferrerPolicy, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parseUserAgent, searchHeaders, searchStatusCodes, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateRobotsTxt, validateSitemap } from '../chunk-DBNTO3YO.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -1751,6 +1751,35 @@ function calculateRoi(input) {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
return result;
|
|
1753
1753
|
}
|
|
1754
|
+
function compareUnitPrices(items) {
|
|
1755
|
+
if (!Array.isArray(items) || items.length < 2) {
|
|
1756
|
+
return { error: "At least 2 items are required to compare" };
|
|
1757
|
+
}
|
|
1758
|
+
for (const item of items) {
|
|
1759
|
+
if (!item.label || typeof item.label !== "string") {
|
|
1760
|
+
return { error: "Each item must have a non-empty label" };
|
|
1761
|
+
}
|
|
1762
|
+
if (!Number.isFinite(item.price) || item.price <= 0) {
|
|
1763
|
+
return { error: `Item "${item.label}" must have a price greater than zero` };
|
|
1764
|
+
}
|
|
1765
|
+
if (!Number.isFinite(item.quantity) || item.quantity <= 0) {
|
|
1766
|
+
return { error: `Item "${item.label}" must have a quantity greater than zero` };
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
1770
|
+
const unitPrices = items.map((item) => item.price / item.quantity);
|
|
1771
|
+
const bestUnitPrice = Math.min(...unitPrices);
|
|
1772
|
+
const results = items.map((item, i) => ({
|
|
1773
|
+
label: item.label,
|
|
1774
|
+
price: round4(item.price),
|
|
1775
|
+
quantity: round4(item.quantity),
|
|
1776
|
+
unitPrice: round4(unitPrices[i]),
|
|
1777
|
+
isBest: unitPrices[i] === bestUnitPrice,
|
|
1778
|
+
percentMoreThanBest: round4((unitPrices[i] - bestUnitPrice) / bestUnitPrice * 100)
|
|
1779
|
+
}));
|
|
1780
|
+
const bestLabel = results.find((r) => r.isBest).label;
|
|
1781
|
+
return { items: results, bestLabel };
|
|
1782
|
+
}
|
|
1754
1783
|
|
|
1755
1784
|
exports.BASE_LABELS = BASE_LABELS;
|
|
1756
1785
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -1784,6 +1813,7 @@ exports.calculateTimeValue = calculateTimeValue;
|
|
|
1784
1813
|
exports.calculateTipSplit = calculateTipSplit;
|
|
1785
1814
|
exports.calculateVideoBitrate = calculateVideoBitrate;
|
|
1786
1815
|
exports.compareSemver = compareSemver;
|
|
1816
|
+
exports.compareUnitPrices = compareUnitPrices;
|
|
1787
1817
|
exports.convert = convert;
|
|
1788
1818
|
exports.convertAprApy = convertAprApy;
|
|
1789
1819
|
exports.convertBytes = convertBytes;
|
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
|
|
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 CompareUnitPricesResult, w as CompoundInterestResult, x as CompoundYearRow, D as Dimensions, y as DiscountField, z as DiscountInput, E as DiscountResult, F as EmiResult, G as EmiTenureUnit, H as EmiYearlyBreakdownRow, I as FilePermissions, J as FormatOptions, K as IbanValidationResult, L as IpConversion, M as IsbnFormat, N as IsbnResult, O as LoanResult, P as MarginMarkupField, Q as MarginMarkupInput, R as MarginMarkupResult, S as NotationStyle, T as NumberBase, U as PercentChangeDirection, V as PercentageChangeResult, W as Permission, X as PxConvertResult, Y as RoiInput, Z as RoiResult, _ as RuleOf72Direction, $ as RuleOf72Result, a0 as SavingsGoalInput, a1 as SavingsGoalMode, a2 as SavingsGoalResult, a3 as SemverVersion, a4 as SimpleInterestResult, a5 as SubnetInfo, a6 as SuccessiveDiscountResult, a7 as SuccessiveDiscountStep, a8 as TaxDirection, a9 as TaxResult, aa as TimeValueDirection, ab as TimeValueResult, ac as TipSplitResult, ad as UnitPriceItem, ae as UnitPriceResult, af as VideoBitrateInput, ag as VideoBitrateMode, ah as VideoBitrateResult, ai as ViewportConvertResult, aj as applySuccessiveDiscounts, ak as autoFormat, al as bumpVersion, am as calcAspectRatio, an as calcSubnet, ao as calculateBreakEven, ap as calculateCompoundInterest, aq as calculateDiscount, ar as calculateEmi, as as calculateLoan, at as calculateMarginMarkup, au as calculatePercentageChange, av as calculateRoi, aw as calculateRuleOf72, ax as calculateSavingsGoal, ay as calculateSimpleInterest, az as calculateTax, aA as calculateTimeValue, aB as calculateTipSplit, aC as calculateVideoBitrate, aD as compareSemver, aE as compareUnitPrices, aF as convert, aG as convertAprApy, aH as convertBytes, aI as convertIp, aJ as coverBox, aK as decimalToIp, aL as decimalToIpCidr, aM as describePermissions, aN as fitIntoBox, aO as formatNumber, aP as formatValue, aQ as formatVwValue, aR as formatWithSeparator, aS as gcd, aT as ipFromBinary, aU as ipFromDecimal, aV as ipFromHex, aW as ipToBinary, aX as ipToDecimal, aY as ipToDecimalCidr, aZ as ipToHex, a_ as ipToOctal, a$ as isValid, b0 as isValidCidr, b1 as isValidIp, b2 as isValidIpv4, b3 as marginToMarkup, b4 as markupToMargin, b5 as octalToPermissions, b6 as parseFileSize, b7 as parseInput, b8 as parseNumberString, b9 as parseSemver, ba as permissionsToChmod, bb as permissionsToOctal, bc as permissionsToSymbolic, bd as ptToPx, be as pxToAll, bf as pxToViewport, bg as remToPx, bh as satisfiesRange, bi as scaleByHeight, bj as scaleByWidth, bk as sortVersions, bl as splitSubnet, bm as symbolicToPermissions, bn as validateBarcode, bo as validateCardNumber, bp as validateIban, bq as validateIsbn, br as viewportToPx } from '../units-HQrMCiNM.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
|
|
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 CompareUnitPricesResult, w as CompoundInterestResult, x as CompoundYearRow, D as Dimensions, y as DiscountField, z as DiscountInput, E as DiscountResult, F as EmiResult, G as EmiTenureUnit, H as EmiYearlyBreakdownRow, I as FilePermissions, J as FormatOptions, K as IbanValidationResult, L as IpConversion, M as IsbnFormat, N as IsbnResult, O as LoanResult, P as MarginMarkupField, Q as MarginMarkupInput, R as MarginMarkupResult, S as NotationStyle, T as NumberBase, U as PercentChangeDirection, V as PercentageChangeResult, W as Permission, X as PxConvertResult, Y as RoiInput, Z as RoiResult, _ as RuleOf72Direction, $ as RuleOf72Result, a0 as SavingsGoalInput, a1 as SavingsGoalMode, a2 as SavingsGoalResult, a3 as SemverVersion, a4 as SimpleInterestResult, a5 as SubnetInfo, a6 as SuccessiveDiscountResult, a7 as SuccessiveDiscountStep, a8 as TaxDirection, a9 as TaxResult, aa as TimeValueDirection, ab as TimeValueResult, ac as TipSplitResult, ad as UnitPriceItem, ae as UnitPriceResult, af as VideoBitrateInput, ag as VideoBitrateMode, ah as VideoBitrateResult, ai as ViewportConvertResult, aj as applySuccessiveDiscounts, ak as autoFormat, al as bumpVersion, am as calcAspectRatio, an as calcSubnet, ao as calculateBreakEven, ap as calculateCompoundInterest, aq as calculateDiscount, ar as calculateEmi, as as calculateLoan, at as calculateMarginMarkup, au as calculatePercentageChange, av as calculateRoi, aw as calculateRuleOf72, ax as calculateSavingsGoal, ay as calculateSimpleInterest, az as calculateTax, aA as calculateTimeValue, aB as calculateTipSplit, aC as calculateVideoBitrate, aD as compareSemver, aE as compareUnitPrices, aF as convert, aG as convertAprApy, aH as convertBytes, aI as convertIp, aJ as coverBox, aK as decimalToIp, aL as decimalToIpCidr, aM as describePermissions, aN as fitIntoBox, aO as formatNumber, aP as formatValue, aQ as formatVwValue, aR as formatWithSeparator, aS as gcd, aT as ipFromBinary, aU as ipFromDecimal, aV as ipFromHex, aW as ipToBinary, aX as ipToDecimal, aY as ipToDecimalCidr, aZ as ipToHex, a_ as ipToOctal, a$ as isValid, b0 as isValidCidr, b1 as isValidIp, b2 as isValidIpv4, b3 as marginToMarkup, b4 as markupToMargin, b5 as octalToPermissions, b6 as parseFileSize, b7 as parseInput, b8 as parseNumberString, b9 as parseSemver, ba as permissionsToChmod, bb as permissionsToOctal, bc as permissionsToSymbolic, bd as ptToPx, be as pxToAll, bf as pxToViewport, bg as remToPx, bh as satisfiesRange, bi as scaleByHeight, bj as scaleByWidth, bk as sortVersions, bl as splitSubnet, bm as symbolicToPermissions, bn as validateBarcode, bo as validateCardNumber, bp as validateIban, bq as validateIsbn, br as viewportToPx } from '../units-HQrMCiNM.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, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCompoundInterest, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCompoundInterest, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, 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-47RI5V3B.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
* - emi-calculator : calculateEmi
|
|
32
32
|
* - savings-goal-calculator : calculateSavingsGoal
|
|
33
33
|
* - roi-calculator : calculateRoi
|
|
34
|
+
* - unit-price-comparator : compareUnitPrices
|
|
34
35
|
*/
|
|
35
36
|
interface PxConvertResult {
|
|
36
37
|
px: number;
|
|
@@ -737,6 +738,33 @@ interface RoiResult {
|
|
|
737
738
|
declare function calculateRoi(input: RoiInput): RoiResult | {
|
|
738
739
|
error: string;
|
|
739
740
|
};
|
|
741
|
+
interface UnitPriceItem {
|
|
742
|
+
label: string;
|
|
743
|
+
price: number;
|
|
744
|
+
quantity: number;
|
|
745
|
+
}
|
|
746
|
+
interface UnitPriceResult {
|
|
747
|
+
label: string;
|
|
748
|
+
price: number;
|
|
749
|
+
quantity: number;
|
|
750
|
+
unitPrice: number;
|
|
751
|
+
isBest: boolean;
|
|
752
|
+
percentMoreThanBest: number;
|
|
753
|
+
}
|
|
754
|
+
interface CompareUnitPricesResult {
|
|
755
|
+
items: UnitPriceResult[];
|
|
756
|
+
bestLabel: string;
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Compare two or more package options by price and quantity to find the
|
|
760
|
+
* true cost per unit (price / quantity) for each, flag the cheapest, and
|
|
761
|
+
* report how much more expensive each other option is by percentage.
|
|
762
|
+
* Unit-agnostic: pass quantity in whatever unit makes the options
|
|
763
|
+
* comparable (grams, litres, item count, etc.) — no conversion is done.
|
|
764
|
+
*/
|
|
765
|
+
declare function compareUnitPrices(items: UnitPriceItem[]): CompareUnitPricesResult | {
|
|
766
|
+
error: string;
|
|
767
|
+
};
|
|
740
768
|
|
|
741
769
|
type units_AmortizationRow = AmortizationRow;
|
|
742
770
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -761,6 +789,7 @@ declare const units_COMMON_TAX_RATES: typeof COMMON_TAX_RATES;
|
|
|
761
789
|
declare const units_COMMON_TIP_PERCENTAGES: typeof COMMON_TIP_PERCENTAGES;
|
|
762
790
|
declare const units_COMMON_VIEWPORTS: typeof COMMON_VIEWPORTS;
|
|
763
791
|
type units_CardValidationResult = CardValidationResult;
|
|
792
|
+
type units_CompareUnitPricesResult = CompareUnitPricesResult;
|
|
764
793
|
type units_CompoundInterestResult = CompoundInterestResult;
|
|
765
794
|
type units_CompoundYearRow = CompoundYearRow;
|
|
766
795
|
type units_Dimensions = Dimensions;
|
|
@@ -803,6 +832,8 @@ type units_TaxResult = TaxResult;
|
|
|
803
832
|
type units_TimeValueDirection = TimeValueDirection;
|
|
804
833
|
type units_TimeValueResult = TimeValueResult;
|
|
805
834
|
type units_TipSplitResult = TipSplitResult;
|
|
835
|
+
type units_UnitPriceItem = UnitPriceItem;
|
|
836
|
+
type units_UnitPriceResult = UnitPriceResult;
|
|
806
837
|
type units_VideoBitrateInput = VideoBitrateInput;
|
|
807
838
|
type units_VideoBitrateMode = VideoBitrateMode;
|
|
808
839
|
type units_VideoBitrateResult = VideoBitrateResult;
|
|
@@ -828,6 +859,7 @@ declare const units_calculateTimeValue: typeof calculateTimeValue;
|
|
|
828
859
|
declare const units_calculateTipSplit: typeof calculateTipSplit;
|
|
829
860
|
declare const units_calculateVideoBitrate: typeof calculateVideoBitrate;
|
|
830
861
|
declare const units_compareSemver: typeof compareSemver;
|
|
862
|
+
declare const units_compareUnitPrices: typeof compareUnitPrices;
|
|
831
863
|
declare const units_convert: typeof convert;
|
|
832
864
|
declare const units_convertAprApy: typeof convertAprApy;
|
|
833
865
|
declare const units_convertBytes: typeof convertBytes;
|
|
@@ -880,7 +912,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
880
912
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
881
913
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
882
914
|
declare namespace units {
|
|
883
|
-
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_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, 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_calculateCompoundInterest as calculateCompoundInterest, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, 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_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 };
|
|
915
|
+
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_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_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, 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_calculateCompoundInterest as calculateCompoundInterest, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, 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 };
|
|
884
916
|
}
|
|
885
917
|
|
|
886
|
-
export { type
|
|
918
|
+
export { type RuleOf72Result as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type Dimensions as D, type DiscountResult as E, type EmiResult as F, type EmiTenureUnit as G, type EmiYearlyBreakdownRow as H, type FilePermissions as I, type FormatOptions as J, type IbanValidationResult as K, type IpConversion as L, type IsbnFormat as M, type IsbnResult as N, type LoanResult as O, type MarginMarkupField as P, type MarginMarkupInput as Q, type MarginMarkupResult as R, type NotationStyle as S, type NumberBase as T, type PercentChangeDirection as U, type PercentageChangeResult as V, type Permission as W, type PxConvertResult as X, type RoiInput as Y, type RoiResult as Z, type RuleOf72Direction as _, type AprApyDirection as a, isValid as a$, type SavingsGoalInput as a0, type SavingsGoalMode as a1, type SavingsGoalResult as a2, type SemverVersion as a3, type SimpleInterestResult as a4, type SubnetInfo as a5, type SuccessiveDiscountResult as a6, type SuccessiveDiscountStep as a7, type TaxDirection as a8, type TaxResult as a9, calculateTimeValue as aA, calculateTipSplit as aB, calculateVideoBitrate as aC, compareSemver as aD, compareUnitPrices as aE, convert as aF, convertAprApy as aG, convertBytes as aH, convertIp as aI, coverBox as aJ, decimalToIp as aK, decimalToIpCidr as aL, describePermissions as aM, fitIntoBox as aN, formatNumber as aO, formatValue as aP, formatVwValue as aQ, formatWithSeparator as aR, gcd as aS, ipFromBinary as aT, ipFromDecimal as aU, ipFromHex as aV, ipToBinary as aW, ipToDecimal as aX, ipToDecimalCidr as aY, ipToHex as aZ, ipToOctal as a_, type TimeValueDirection as aa, type TimeValueResult as ab, type TipSplitResult as ac, type UnitPriceItem as ad, type UnitPriceResult as ae, type VideoBitrateInput as af, type VideoBitrateMode as ag, type VideoBitrateResult as ah, type ViewportConvertResult as ai, applySuccessiveDiscounts as aj, autoFormat as ak, bumpVersion as al, calcAspectRatio as am, calcSubnet as an, calculateBreakEven as ao, calculateCompoundInterest as ap, calculateDiscount as aq, calculateEmi as ar, calculateLoan as as, calculateMarginMarkup as at, calculatePercentageChange as au, calculateRoi as av, calculateRuleOf72 as aw, calculateSavingsGoal as ax, calculateSimpleInterest as ay, calculateTax as az, type AprApyResult as b, isValidCidr as b0, isValidIp as b1, isValidIpv4 as b2, marginToMarkup as b3, markupToMargin as b4, octalToPermissions as b5, parseFileSize as b6, parseInput as b7, parseNumberString as b8, parseSemver as b9, permissionsToChmod as ba, permissionsToOctal as bb, permissionsToSymbolic as bc, ptToPx as bd, pxToAll as be, pxToViewport as bf, remToPx as bg, satisfiesRange as bh, scaleByHeight as bi, scaleByWidth as bj, sortVersions as bk, splitSubnet as bl, symbolicToPermissions as bm, validateBarcode as bn, validateCardNumber as bo, validateIban as bp, validateIsbn as bq, viewportToPx as br, 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 CompareUnitPricesResult as v, type CompoundInterestResult as w, type CompoundYearRow as x, type DiscountField as y, type DiscountInput as z };
|