@utilix-tech/sdk 0.15.0 → 0.17.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 +6 -0
- package/README.md +28 -9
- package/dist/{chunk-OB56VNKJ.js → chunk-3QMUUTBH.js} +107 -1
- package/dist/{chunk-IPR7FSX4.js → chunk-DOWQZUTP.js} +61 -1
- package/dist/{chunk-Y5X34JAC.js → chunk-L53LAVAD.js} +64 -1
- package/dist/{chunk-RJPYVCKQ.js → chunk-M4MMO6C6.js} +18 -1
- package/dist/{code-C4skwg3l.d.cts → code-Cn9uOIAh.d.cts} +27 -2
- package/dist/{code-C4skwg3l.d.ts → code-Cn9uOIAh.d.ts} +27 -2
- package/dist/{encoding-7gmq-vkV.d.cts → encoding-Dk3wpmb3.d.cts} +19 -2
- package/dist/{encoding-7gmq-vkV.d.ts → encoding-Dk3wpmb3.d.ts} +19 -2
- package/dist/index.cjs +246 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/{network-DaNoZ5ER.d.ts → network-DZugNyAQ.d.cts} +35 -2
- package/dist/{network-DaNoZ5ER.d.cts → network-DZugNyAQ.d.ts} +35 -2
- package/dist/tools/code.cjs +63 -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/encoding.cjs +60 -0
- package/dist/tools/encoding.d.cts +1 -1
- package/dist/tools/encoding.d.ts +1 -1
- package/dist/tools/encoding.js +1 -1
- package/dist/tools/network.cjs +106 -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 +17 -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-CADUCiYZ.d.cts → units-CkV4kAIs.d.cts} +21 -2
- package/dist/{units-CADUCiYZ.d.ts → units-CkV4kAIs.d.ts} +21 -2
- package/package.json +1 -1
package/dist/tools/code.cjs
CHANGED
|
@@ -2363,6 +2363,68 @@ function lookupMime(query) {
|
|
|
2363
2363
|
if (matches.length === 0) return { error: `No known MIME type for extension ".${ext}"` };
|
|
2364
2364
|
return { query: trimmed, kind: "extension", matches };
|
|
2365
2365
|
}
|
|
2366
|
+
function _parseGithubLineRange(hash) {
|
|
2367
|
+
const m = hash.match(/^#?L(\d+)(?:-L?(\d+))?$/i);
|
|
2368
|
+
if (!m) return {};
|
|
2369
|
+
const startLine = parseInt(m[1], 10);
|
|
2370
|
+
const endLine = m[2] ? parseInt(m[2], 10) : void 0;
|
|
2371
|
+
return endLine !== void 0 ? { startLine, endLine } : { startLine };
|
|
2372
|
+
}
|
|
2373
|
+
function parseGithubUrl(input) {
|
|
2374
|
+
if (!input || typeof input !== "string" || input.trim() === "") {
|
|
2375
|
+
return { error: "Empty URL" };
|
|
2376
|
+
}
|
|
2377
|
+
const trimmed = input.trim();
|
|
2378
|
+
const normalized = /^https?:\/\//i.test(trimmed) ? trimmed : `https://${trimmed}`;
|
|
2379
|
+
let url;
|
|
2380
|
+
try {
|
|
2381
|
+
url = new URL(normalized);
|
|
2382
|
+
} catch {
|
|
2383
|
+
return { error: "Invalid URL" };
|
|
2384
|
+
}
|
|
2385
|
+
if (!/^(www\.)?github\.com$/i.test(url.hostname)) {
|
|
2386
|
+
return { error: `Not a github.com URL (got host "${url.hostname}")` };
|
|
2387
|
+
}
|
|
2388
|
+
const segments = url.pathname.split("/").filter(Boolean);
|
|
2389
|
+
if (segments.length < 2) {
|
|
2390
|
+
return { error: "URL must include an owner and a repository" };
|
|
2391
|
+
}
|
|
2392
|
+
const [owner, repo, ...rest] = segments;
|
|
2393
|
+
if (rest.length === 0) {
|
|
2394
|
+
return { owner, repo, type: "repo" };
|
|
2395
|
+
}
|
|
2396
|
+
const kind = rest[0];
|
|
2397
|
+
if (kind === "pull" || kind === "issues") {
|
|
2398
|
+
const number = parseInt(rest[1], 10);
|
|
2399
|
+
if (!rest[1] || Number.isNaN(number)) {
|
|
2400
|
+
return { error: `Missing ${kind === "pull" ? "pull request" : "issue"} number` };
|
|
2401
|
+
}
|
|
2402
|
+
return { owner, repo, type: kind === "pull" ? "pull" : "issue", number };
|
|
2403
|
+
}
|
|
2404
|
+
if (kind === "commit") {
|
|
2405
|
+
if (!rest[1]) return { error: "Missing commit SHA" };
|
|
2406
|
+
return { owner, repo, type: "commit", ref: rest[1] };
|
|
2407
|
+
}
|
|
2408
|
+
if (kind === "blob") {
|
|
2409
|
+
const ref = rest[1];
|
|
2410
|
+
const path = rest.slice(2).join("/");
|
|
2411
|
+
if (!ref || !path) return { error: "File URL must include a ref and a file path (/blob/<ref>/<path>)" };
|
|
2412
|
+
return { owner, repo, type: "file", ref, path, ..._parseGithubLineRange(url.hash) };
|
|
2413
|
+
}
|
|
2414
|
+
if (kind === "tree") {
|
|
2415
|
+
const ref = rest[1];
|
|
2416
|
+
if (!ref) return { error: "Missing branch or tag ref (/tree/<ref>)" };
|
|
2417
|
+
const path = rest.slice(2).join("/");
|
|
2418
|
+
return { owner, repo, type: "tree", ref, ...path ? { path } : {} };
|
|
2419
|
+
}
|
|
2420
|
+
if (kind === "releases") {
|
|
2421
|
+
if (rest[1] !== "tag" || !rest[2]) {
|
|
2422
|
+
return { error: "Unsupported releases URL (expected /releases/tag/<name>)" };
|
|
2423
|
+
}
|
|
2424
|
+
return { owner, repo, type: "release", ref: rest[2] };
|
|
2425
|
+
}
|
|
2426
|
+
return { error: `Unsupported GitHub URL path: /${rest.join("/")}` };
|
|
2427
|
+
}
|
|
2366
2428
|
|
|
2367
2429
|
exports.ALL_FLAGS = ALL_FLAGS;
|
|
2368
2430
|
exports.CHEATSHEET = CHEATSHEET;
|
|
@@ -2399,6 +2461,7 @@ exports.normalizeRef = normalizeRef;
|
|
|
2399
2461
|
exports.parseDockerImage = parseDockerImage;
|
|
2400
2462
|
exports.parseEnv = parseEnv;
|
|
2401
2463
|
exports.parseGitCommand = parseGitCommand;
|
|
2464
|
+
exports.parseGithubUrl = parseGithubUrl;
|
|
2402
2465
|
exports.parseSpec = parseSpec;
|
|
2403
2466
|
exports.removeConsoleCalls = removeConsoleCalls;
|
|
2404
2467
|
exports.removeEmptyAttributes = removeEmptyAttributes;
|
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 CssResult, D as DockerImageRef, E as EnvEntry, f as EnvParseResult, G as GitCommandConfig, g as GitCommandResult, h as GitOperation, i 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 CssResult, D as DockerImageRef, E as EnvEntry, f as EnvParseResult, G as GitCommandConfig, g as GitCommandResult, h as GitOperation, i as GithubUrlInfo, j as GithubUrlType, k as GqlFormatResult, H as HtmlFormatResult, l as HtmlMinifyOptions, m as HtmlMinifyResult, J as JsMinifyOptions, n as JsMinifyResult, M as MIME_TABLE, o as MatchResult, p as MimeEntry, q as MimeLookupResult, O as OPERATIONS, P as ParsedSpec, R as RegexError, r as RegexFlag, s as RegexMatch, t as RegexResult, u as RegexSuccess, S as SQL_DEFAULT_OPTIONS, v as Segment, w as SpecVersion, x as SqlDialect, y as SqlFormatOptions, T as TestPatternResult, z as buildDockerPull, B as buildDockerRun, F as buildGitCommand, I as collapseHtmlWhitespace, K as collapseJsWhitespace, L as countProperties, N as countRules, Q as detectDialect, U as detectOperationType, V as envToExport, W as envToJson, X as formatCss, Y as formatGql, Z as formatHtml, _ as formatSql, $ as getEndpointsByTag, a0 as getHtmlStats, a1 as getJsStats, a2 as getMethodColor, a3 as isValidTag, a4 as lookupMime, a5 as minifyCss, a6 as minifyGql, a7 as minifyHtml, a8 as minifyJs, a9 as minifySql, aa as normalizeRef, ab as parseDockerImage, ac as parseEnv, ad as parseGitCommand, ae as parseGithubUrl, af as parseSpec, ag as removeConsoleCalls, ah as removeEmptyAttributes, ai as removeHtmlComments, aj as removeJsComments, ak as removeRedundantAttributes, al as searchCheatsheet, am as searchEndpoints, an as splitStatements, ao as testPattern, ap as testRegex, aq as validateEnvKey } from '../code-Cn9uOIAh.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 CssResult, D as DockerImageRef, E as EnvEntry, f as EnvParseResult, G as GitCommandConfig, g as GitCommandResult, h as GitOperation, i 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 CssResult, D as DockerImageRef, E as EnvEntry, f as EnvParseResult, G as GitCommandConfig, g as GitCommandResult, h as GitOperation, i as GithubUrlInfo, j as GithubUrlType, k as GqlFormatResult, H as HtmlFormatResult, l as HtmlMinifyOptions, m as HtmlMinifyResult, J as JsMinifyOptions, n as JsMinifyResult, M as MIME_TABLE, o as MatchResult, p as MimeEntry, q as MimeLookupResult, O as OPERATIONS, P as ParsedSpec, R as RegexError, r as RegexFlag, s as RegexMatch, t as RegexResult, u as RegexSuccess, S as SQL_DEFAULT_OPTIONS, v as Segment, w as SpecVersion, x as SqlDialect, y as SqlFormatOptions, T as TestPatternResult, z as buildDockerPull, B as buildDockerRun, F as buildGitCommand, I as collapseHtmlWhitespace, K as collapseJsWhitespace, L as countProperties, N as countRules, Q as detectDialect, U as detectOperationType, V as envToExport, W as envToJson, X as formatCss, Y as formatGql, Z as formatHtml, _ as formatSql, $ as getEndpointsByTag, a0 as getHtmlStats, a1 as getJsStats, a2 as getMethodColor, a3 as isValidTag, a4 as lookupMime, a5 as minifyCss, a6 as minifyGql, a7 as minifyHtml, a8 as minifyJs, a9 as minifySql, aa as normalizeRef, ab as parseDockerImage, ac as parseEnv, ad as parseGitCommand, ae as parseGithubUrl, af as parseSpec, ag as removeConsoleCalls, ah as removeEmptyAttributes, ai as removeHtmlComments, aj as removeJsComments, ak as removeRedundantAttributes, al as searchCheatsheet, am as searchEndpoints, an as splitStatements, ao as testPattern, ap as testRegex, aq as validateEnvKey } from '../code-Cn9uOIAh.js';
|
package/dist/tools/code.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ALL_FLAGS, CHEATSHEET, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testPattern, testRegex, validateEnvKey } from '../chunk-
|
|
1
|
+
export { ALL_FLAGS, CHEATSHEET, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, 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-L53LAVAD.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/encoding.cjs
CHANGED
|
@@ -244,12 +244,72 @@ function isValidBase32(input, alphabet = "standard") {
|
|
|
244
244
|
if (rem === 1 || rem === 3 || rem === 6) return false;
|
|
245
245
|
return true;
|
|
246
246
|
}
|
|
247
|
+
var BASE58_ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
248
|
+
var BASE62_ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
249
|
+
function encodeBytesToBase(bytes, alphabet) {
|
|
250
|
+
const base = BigInt(alphabet.length);
|
|
251
|
+
let num = 0n;
|
|
252
|
+
for (const byte of bytes) num = num << 8n | BigInt(byte);
|
|
253
|
+
let out = "";
|
|
254
|
+
while (num > 0n) {
|
|
255
|
+
out = alphabet[Number(num % base)] + out;
|
|
256
|
+
num = num / base;
|
|
257
|
+
}
|
|
258
|
+
let leadingZeros = 0;
|
|
259
|
+
for (const byte of bytes) {
|
|
260
|
+
if (byte === 0) leadingZeros++;
|
|
261
|
+
else break;
|
|
262
|
+
}
|
|
263
|
+
return alphabet[0].repeat(leadingZeros) + out;
|
|
264
|
+
}
|
|
265
|
+
function decodeBaseToBytes(input, alphabet) {
|
|
266
|
+
const base = BigInt(alphabet.length);
|
|
267
|
+
let num = 0n;
|
|
268
|
+
for (const char of input) {
|
|
269
|
+
const idx = alphabet.indexOf(char);
|
|
270
|
+
if (idx === -1) return { error: `Invalid character '${char}' for this alphabet` };
|
|
271
|
+
num = num * base + BigInt(idx);
|
|
272
|
+
}
|
|
273
|
+
const bytes = [];
|
|
274
|
+
while (num > 0n) {
|
|
275
|
+
bytes.unshift(Number(num % 256n));
|
|
276
|
+
num = num / 256n;
|
|
277
|
+
}
|
|
278
|
+
let leadingZeros = 0;
|
|
279
|
+
for (const char of input) {
|
|
280
|
+
if (char === alphabet[0]) leadingZeros++;
|
|
281
|
+
else break;
|
|
282
|
+
}
|
|
283
|
+
return new Uint8Array([...new Array(leadingZeros).fill(0), ...bytes]);
|
|
284
|
+
}
|
|
285
|
+
function base58Encode(input) {
|
|
286
|
+
return encodeBytesToBase(stringToBytes(input), BASE58_ALPHABET);
|
|
287
|
+
}
|
|
288
|
+
function base58Decode(input) {
|
|
289
|
+
if (!input) return { error: "No input provided" };
|
|
290
|
+
const result = decodeBaseToBytes(input, BASE58_ALPHABET);
|
|
291
|
+
if (!(result instanceof Uint8Array)) return result;
|
|
292
|
+
return bytesToString(result);
|
|
293
|
+
}
|
|
294
|
+
function base62Encode(input) {
|
|
295
|
+
return encodeBytesToBase(stringToBytes(input), BASE62_ALPHABET);
|
|
296
|
+
}
|
|
297
|
+
function base62Decode(input) {
|
|
298
|
+
if (!input) return { error: "No input provided" };
|
|
299
|
+
const result = decodeBaseToBytes(input, BASE62_ALPHABET);
|
|
300
|
+
if (!(result instanceof Uint8Array)) return result;
|
|
301
|
+
return bytesToString(result);
|
|
302
|
+
}
|
|
247
303
|
|
|
248
304
|
exports.ALPHABETS = ALPHABETS;
|
|
249
305
|
exports.base32Decode = base32Decode;
|
|
250
306
|
exports.base32DecodeBytes = base32DecodeBytes;
|
|
251
307
|
exports.base32Encode = base32Encode;
|
|
252
308
|
exports.base32EncodeBytes = base32EncodeBytes;
|
|
309
|
+
exports.base58Decode = base58Decode;
|
|
310
|
+
exports.base58Encode = base58Encode;
|
|
311
|
+
exports.base62Decode = base62Decode;
|
|
312
|
+
exports.base62Encode = base62Encode;
|
|
253
313
|
exports.decodeBase64 = decodeBase64;
|
|
254
314
|
exports.decodeHtmlEntities = decodeHtmlEntities;
|
|
255
315
|
exports.decodeUrl = decodeUrl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ALPHABETS, B as Base32Alphabet, a as Base64DecodeResult, b as Base64EncodeResult, c as Base64Error, d as Base64Variant, D as DecodeResult, E as EncodeResult, U as UrlEncodeError, f as UrlEncodeMode, g as UrlEncodeResult, h as UrlResult, i as base32Decode, j as base32DecodeBytes, k as base32Encode, l as base32EncodeBytes, m as
|
|
1
|
+
export { A as ALPHABETS, B as Base32Alphabet, a as Base64DecodeResult, b as Base64EncodeResult, c as Base64Error, d as Base64Variant, D as DecodeResult, E as EncodeResult, U as UrlEncodeError, f as UrlEncodeMode, g as UrlEncodeResult, h as UrlResult, i as base32Decode, j as base32DecodeBytes, k as base32Encode, l as base32EncodeBytes, m as base58Decode, n as base58Encode, o as base62Decode, p as base62Encode, q as decodeBase64, r as decodeHtmlEntities, s as decodeUrl, t as diffSegments, u as encodeBase64, v as encodeHtmlEntities, w as encodeHtmlEntitiesAll, x as encodeMode, y as encodeUrl, z as isValidBase32 } from '../encoding-Dk3wpmb3.cjs';
|
package/dist/tools/encoding.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ALPHABETS, B as Base32Alphabet, a as Base64DecodeResult, b as Base64EncodeResult, c as Base64Error, d as Base64Variant, D as DecodeResult, E as EncodeResult, U as UrlEncodeError, f as UrlEncodeMode, g as UrlEncodeResult, h as UrlResult, i as base32Decode, j as base32DecodeBytes, k as base32Encode, l as base32EncodeBytes, m as
|
|
1
|
+
export { A as ALPHABETS, B as Base32Alphabet, a as Base64DecodeResult, b as Base64EncodeResult, c as Base64Error, d as Base64Variant, D as DecodeResult, E as EncodeResult, U as UrlEncodeError, f as UrlEncodeMode, g as UrlEncodeResult, h as UrlResult, i as base32Decode, j as base32DecodeBytes, k as base32Encode, l as base32EncodeBytes, m as base58Decode, n as base58Encode, o as base62Decode, p as base62Encode, q as decodeBase64, r as decodeHtmlEntities, s as decodeUrl, t as diffSegments, u as encodeBase64, v as encodeHtmlEntities, w as encodeHtmlEntitiesAll, x as encodeMode, y as encodeUrl, z as isValidBase32 } from '../encoding-Dk3wpmb3.js';
|
package/dist/tools/encoding.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ALPHABETS, base32Decode, base32DecodeBytes, base32Encode, base32EncodeBytes, decodeBase64, decodeHtmlEntities, decodeUrl, diffSegments, encodeBase64, encodeHtmlEntities, encodeHtmlEntitiesAll, encodeUrl, isValidBase32 } from '../chunk-
|
|
1
|
+
export { ALPHABETS, base32Decode, base32DecodeBytes, base32Encode, base32EncodeBytes, base58Decode, base58Encode, base62Decode, base62Encode, decodeBase64, decodeHtmlEntities, decodeUrl, diffSegments, encodeBase64, encodeHtmlEntities, encodeHtmlEntitiesAll, encodeUrl, isValidBase32 } from '../chunk-DOWQZUTP.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/network.cjs
CHANGED
|
@@ -1580,6 +1580,111 @@ function validateRobotsTxt(text) {
|
|
|
1580
1580
|
const valid = !issues.some((i) => i.severity === "error");
|
|
1581
1581
|
return { groups, sitemaps, issues, valid };
|
|
1582
1582
|
}
|
|
1583
|
+
var UA_BOT_PATTERNS = [
|
|
1584
|
+
[/googlebot/i, "Googlebot"],
|
|
1585
|
+
[/bingbot/i, "Bingbot"],
|
|
1586
|
+
[/slurp/i, "Slurp"],
|
|
1587
|
+
[/duckduckbot/i, "DuckDuckBot"],
|
|
1588
|
+
[/baiduspider/i, "Baiduspider"],
|
|
1589
|
+
[/yandexbot/i, "YandexBot"],
|
|
1590
|
+
[/facebookexternalhit/i, "Facebot"],
|
|
1591
|
+
[/twitterbot/i, "Twitterbot"],
|
|
1592
|
+
[/applebot/i, "Applebot"],
|
|
1593
|
+
[/discordbot/i, "Discordbot"],
|
|
1594
|
+
[/slackbot/i, "Slackbot"],
|
|
1595
|
+
[/telegrambot/i, "TelegramBot"],
|
|
1596
|
+
[/whatsapp/i, "WhatsApp"],
|
|
1597
|
+
[/ahrefsbot/i, "AhrefsBot"],
|
|
1598
|
+
[/semrushbot/i, "SemrushBot"],
|
|
1599
|
+
[/crawler|spider|\bbot\b/i, "Bot"]
|
|
1600
|
+
];
|
|
1601
|
+
function _detectUaBrowser(s) {
|
|
1602
|
+
let m;
|
|
1603
|
+
if (m = s.match(/Edg(?:A|iOS)?\/([\d.]+)/)) return { name: "Edge", version: m[1] };
|
|
1604
|
+
if (m = s.match(/Edge\/([\d.]+)/)) return { name: "Edge (Legacy)", version: m[1] };
|
|
1605
|
+
if (m = s.match(/OPR\/([\d.]+)/)) return { name: "Opera", version: m[1] };
|
|
1606
|
+
if (m = s.match(/Opera\/([\d.]+)/)) return { name: "Opera", version: m[1] };
|
|
1607
|
+
if (m = s.match(/SamsungBrowser\/([\d.]+)/)) return { name: "Samsung Internet", version: m[1] };
|
|
1608
|
+
if (m = s.match(/FxiOS\/([\d.]+)/)) return { name: "Firefox", version: m[1] };
|
|
1609
|
+
if (m = s.match(/Firefox\/([\d.]+)/)) return { name: "Firefox", version: m[1] };
|
|
1610
|
+
if (m = s.match(/CriOS\/([\d.]+)/)) return { name: "Chrome", version: m[1] };
|
|
1611
|
+
if (m = s.match(/Chrome\/([\d.]+)/)) return { name: "Chrome", version: m[1] };
|
|
1612
|
+
if (m = s.match(/Version\/([\d.]+).*Safari\//)) return { name: "Safari", version: m[1] };
|
|
1613
|
+
if (/Safari\//.test(s)) return { name: "Safari", version: "" };
|
|
1614
|
+
if (m = s.match(/MSIE ([\d.]+)/)) return { name: "Internet Explorer", version: m[1] };
|
|
1615
|
+
if (m = s.match(/Trident\/.*rv:([\d.]+)/)) return { name: "Internet Explorer", version: m[1] };
|
|
1616
|
+
return { name: "Unknown", version: "" };
|
|
1617
|
+
}
|
|
1618
|
+
function _detectUaEngine(s, browserName) {
|
|
1619
|
+
let m;
|
|
1620
|
+
if (/Chrome\/|CriOS\/|Edg\/|OPR\/|SamsungBrowser\//.test(s)) {
|
|
1621
|
+
m = s.match(/Chrome\/([\d.]+)/) || s.match(/CriOS\/([\d.]+)/);
|
|
1622
|
+
return { name: "Blink", version: m ? m[1] : "" };
|
|
1623
|
+
}
|
|
1624
|
+
if (/Firefox\/|FxiOS\//.test(s)) {
|
|
1625
|
+
m = s.match(/rv:([\d.]+)/);
|
|
1626
|
+
return { name: "Gecko", version: m ? m[1] : "" };
|
|
1627
|
+
}
|
|
1628
|
+
if (m = s.match(/AppleWebKit\/([\d.]+)/)) return { name: "WebKit", version: m[1] };
|
|
1629
|
+
if (m = s.match(/Trident\/([\d.]+)/)) return { name: "Trident", version: m[1] };
|
|
1630
|
+
if (browserName === "Edge (Legacy)") return { name: "EdgeHTML", version: "" };
|
|
1631
|
+
return { name: "Unknown", version: "" };
|
|
1632
|
+
}
|
|
1633
|
+
var UA_WINDOWS_VERSIONS = {
|
|
1634
|
+
"10.0": "10",
|
|
1635
|
+
"6.3": "8.1",
|
|
1636
|
+
"6.2": "8",
|
|
1637
|
+
"6.1": "7",
|
|
1638
|
+
"6.0": "Vista",
|
|
1639
|
+
"5.1": "XP"
|
|
1640
|
+
};
|
|
1641
|
+
function _detectUaOs(s) {
|
|
1642
|
+
if (/Windows NT/.test(s)) return "Windows";
|
|
1643
|
+
if (/CrOS/.test(s)) return "ChromeOS";
|
|
1644
|
+
if (/Android/.test(s)) return "Android";
|
|
1645
|
+
if (/iPhone|iPad|iPod/.test(s)) return "iOS";
|
|
1646
|
+
if (/Mac OS X/.test(s)) return "macOS";
|
|
1647
|
+
if (/Linux/.test(s)) return "Linux";
|
|
1648
|
+
return "Unknown";
|
|
1649
|
+
}
|
|
1650
|
+
function _detectUaOsVersion(s) {
|
|
1651
|
+
let m;
|
|
1652
|
+
if (m = s.match(/Windows NT ([\d.]+)/)) return UA_WINDOWS_VERSIONS[m[1]] ?? m[1];
|
|
1653
|
+
if (/CrOS/.test(s) && (m = s.match(/CrOS \S+ ([\d.]+)/))) return m[1];
|
|
1654
|
+
if (m = s.match(/Android ([\d.]+)/)) return m[1];
|
|
1655
|
+
if (m = s.match(/(?:iPhone|CPU) OS ([\d_]+)/)) return m[1].replace(/_/g, ".");
|
|
1656
|
+
if (m = s.match(/Mac OS X ([\d_]+)/)) return m[1].replace(/_/g, ".");
|
|
1657
|
+
return "";
|
|
1658
|
+
}
|
|
1659
|
+
function _detectUaDeviceType(s) {
|
|
1660
|
+
if (/iPad/.test(s)) return "tablet";
|
|
1661
|
+
if (/Android/.test(s) && !/Mobile/.test(s)) return "tablet";
|
|
1662
|
+
if (/Mobile|iPhone|iPod|Android/.test(s)) return "mobile";
|
|
1663
|
+
return "desktop";
|
|
1664
|
+
}
|
|
1665
|
+
function parseUserAgent(ua) {
|
|
1666
|
+
if (!ua || typeof ua !== "string" || ua.trim() === "") {
|
|
1667
|
+
return { error: "Empty user-agent string" };
|
|
1668
|
+
}
|
|
1669
|
+
const s = ua.trim();
|
|
1670
|
+
for (const [re, name] of UA_BOT_PATTERNS) {
|
|
1671
|
+
if (re.test(s)) {
|
|
1672
|
+
const versionMatch = s.match(new RegExp(`${name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\/([\\d.]+)`, "i"));
|
|
1673
|
+
return {
|
|
1674
|
+
browser: { name, version: versionMatch ? versionMatch[1] : "" },
|
|
1675
|
+
engine: { name: "Unknown", version: "" },
|
|
1676
|
+
os: { name: _detectUaOs(s), version: _detectUaOsVersion(s) },
|
|
1677
|
+
device: { type: "bot" },
|
|
1678
|
+
raw: s
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
const browser = _detectUaBrowser(s);
|
|
1683
|
+
const engine = _detectUaEngine(s, browser.name);
|
|
1684
|
+
const os = { name: _detectUaOs(s), version: _detectUaOsVersion(s) };
|
|
1685
|
+
const device = { type: _detectUaDeviceType(s) };
|
|
1686
|
+
return { browser, engine, os, device, raw: s };
|
|
1687
|
+
}
|
|
1583
1688
|
|
|
1584
1689
|
exports.DNS_RECORD_TYPES = DNS_RECORD_TYPES;
|
|
1585
1690
|
exports.HTTP_HEADERS = HTTP_HEADERS;
|
|
@@ -1604,6 +1709,7 @@ exports.isValidIpv6 = isValidIpv6;
|
|
|
1604
1709
|
exports.parseDnsResponse = parseDnsResponse;
|
|
1605
1710
|
exports.parseGeoResponse = parseGeoResponse;
|
|
1606
1711
|
exports.parseHar = parseHar;
|
|
1712
|
+
exports.parseUserAgent = parseUserAgent;
|
|
1607
1713
|
exports.searchHeaders = searchHeaders;
|
|
1608
1714
|
exports.searchStatusCodes = searchStatusCodes;
|
|
1609
1715
|
exports.statusCodeToText = statusCodeToText;
|
package/dist/tools/network.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { D as DNS_RECORD_TYPES, a as DnsRecord, b as DnsRecordType, c as DnsResponse, G as GeoResult, H as HTTP_HEADERS, d as HarEntry, e as HarParseResult, f as HarSummary, g as HeaderCategory, h as HttpHeader, P as ParsedDnsResult, i as ParsedGeoResult, R as RobotsGroup, j as RobotsIssue, k as RobotsRule, l as RobotsValidationResult, S as STATUS_CODES, m as SitemapIndexEntry, o as SitemapIssue, p as SitemapUrlEntry, q as SitemapValidationResult, r as StatusCode, s as
|
|
1
|
+
export { D as DNS_RECORD_TYPES, a as DnsRecord, b as DnsRecordType, c as DnsResponse, G as GeoResult, H as HTTP_HEADERS, d as HarEntry, e as HarParseResult, f as HarSummary, g as HeaderCategory, h as HttpHeader, P as ParsedDnsResult, i as ParsedGeoResult, R as RobotsGroup, j as RobotsIssue, k as RobotsRule, l as RobotsValidationResult, S as STATUS_CODES, m as SitemapIndexEntry, o as SitemapIssue, p as SitemapUrlEntry, q as SitemapValidationResult, r as StatusCode, U as UaDeviceType, s as UserAgentInfo, t as buildDnsQueryUrl, u as buildGeoUrl, v as buildMapUrl, w as countryCodeToFlag, x as formatCoordinates, y as formatTtl, z as getByCategory, A as getHeader, B as getHeadersByCategory, C as getStatusByCategory, E as getStatusCode, F as isClientError, I as isServerError, J as isSuccess, K as isValidIp, L as isValidIpv4, M as isValidIpv6, N as parseDnsResponse, O as parseGeoResponse, Q as parseHar, T as parseUserAgent, V as searchHeaders, W as searchStatusCodes, X as statusCodeToText, Y as typeNumberToLabel, Z as validateDomain, _ as validateHeaderName, $ as validateHeaderValue, a0 as validateRobotsTxt, a1 as validateSitemap } from '../network-DZugNyAQ.cjs';
|
package/dist/tools/network.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { D as DNS_RECORD_TYPES, a as DnsRecord, b as DnsRecordType, c as DnsResponse, G as GeoResult, H as HTTP_HEADERS, d as HarEntry, e as HarParseResult, f as HarSummary, g as HeaderCategory, h as HttpHeader, P as ParsedDnsResult, i as ParsedGeoResult, R as RobotsGroup, j as RobotsIssue, k as RobotsRule, l as RobotsValidationResult, S as STATUS_CODES, m as SitemapIndexEntry, o as SitemapIssue, p as SitemapUrlEntry, q as SitemapValidationResult, r as StatusCode, s as
|
|
1
|
+
export { D as DNS_RECORD_TYPES, a as DnsRecord, b as DnsRecordType, c as DnsResponse, G as GeoResult, H as HTTP_HEADERS, d as HarEntry, e as HarParseResult, f as HarSummary, g as HeaderCategory, h as HttpHeader, P as ParsedDnsResult, i as ParsedGeoResult, R as RobotsGroup, j as RobotsIssue, k as RobotsRule, l as RobotsValidationResult, S as STATUS_CODES, m as SitemapIndexEntry, o as SitemapIssue, p as SitemapUrlEntry, q as SitemapValidationResult, r as StatusCode, U as UaDeviceType, s as UserAgentInfo, t as buildDnsQueryUrl, u as buildGeoUrl, v as buildMapUrl, w as countryCodeToFlag, x as formatCoordinates, y as formatTtl, z as getByCategory, A as getHeader, B as getHeadersByCategory, C as getStatusByCategory, E as getStatusCode, F as isClientError, I as isServerError, J as isSuccess, K as isValidIp, L as isValidIpv4, M as isValidIpv6, N as parseDnsResponse, O as parseGeoResponse, Q as parseHar, T as parseUserAgent, V as searchHeaders, W as searchStatusCodes, X as statusCodeToText, Y as typeNumberToLabel, Z as validateDomain, _ as validateHeaderName, $ as validateHeaderValue, a0 as validateRobotsTxt, a1 as validateSitemap } from '../network-DZugNyAQ.js';
|
package/dist/tools/network.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DNS_RECORD_TYPES, HTTP_HEADERS, STATUS_CODES, buildDnsQueryUrl, buildGeoUrl, buildMapUrl, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, parseDnsResponse, parseGeoResponse, parseHar, searchHeaders, searchStatusCodes, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateRobotsTxt, validateSitemap } from '../chunk-
|
|
1
|
+
export { DNS_RECORD_TYPES, HTTP_HEADERS, STATUS_CODES, buildDnsQueryUrl, buildGeoUrl, buildMapUrl, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, parseDnsResponse, parseGeoResponse, parseHar, parseUserAgent, searchHeaders, searchStatusCodes, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateRobotsTxt, validateSitemap } from '../chunk-3QMUUTBH.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -1209,6 +1209,22 @@ function calculateTipSplit(billAmount, tipPercent, numPeople = 1) {
|
|
|
1209
1209
|
perPersonTotal: round22(totalAmount / numPeople)
|
|
1210
1210
|
};
|
|
1211
1211
|
}
|
|
1212
|
+
function calculateSimpleInterest(principal, annualRatePercent, years) {
|
|
1213
|
+
if (!Number.isFinite(principal) || principal < 0) return { error: "Principal must be zero or a positive number" };
|
|
1214
|
+
if (!Number.isFinite(annualRatePercent) || annualRatePercent < 0) {
|
|
1215
|
+
return { error: "Annual interest rate must be zero or a positive number" };
|
|
1216
|
+
}
|
|
1217
|
+
if (!Number.isFinite(years) || years <= 0) return { error: "Years must be a positive number" };
|
|
1218
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
1219
|
+
const interest = round22(principal * (annualRatePercent / 100) * years);
|
|
1220
|
+
return {
|
|
1221
|
+
principal: round22(principal),
|
|
1222
|
+
annualRatePercent,
|
|
1223
|
+
years,
|
|
1224
|
+
interest,
|
|
1225
|
+
totalPayoff: round22(principal + interest)
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1212
1228
|
|
|
1213
1229
|
exports.BASE_LABELS = BASE_LABELS;
|
|
1214
1230
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -1227,6 +1243,7 @@ exports.calcAspectRatio = calcAspectRatio;
|
|
|
1227
1243
|
exports.calcSubnet = calcSubnet;
|
|
1228
1244
|
exports.calculateCompoundInterest = calculateCompoundInterest;
|
|
1229
1245
|
exports.calculateLoan = calculateLoan;
|
|
1246
|
+
exports.calculateSimpleInterest = calculateSimpleInterest;
|
|
1230
1247
|
exports.calculateTax = calculateTax;
|
|
1231
1248
|
exports.calculateTipSplit = calculateTipSplit;
|
|
1232
1249
|
exports.compareSemver = compareSemver;
|
package/dist/tools/units.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AspectRatioResult, B as BASE_LABELS, b as BASE_PREFIXES, c as BYTE_UNITS, d as BarcodeFormat, e as BarcodeValidationResult, f as BaseConvertResult, g as ByteConvertResult, h as ByteUnit, C as COMMON_CURRENCIES, i as COMMON_LOCALES, j as COMMON_PERMISSIONS, k as COMMON_RATIOS, l as COMMON_SIZES, m as COMMON_TAX_RATES, n as COMMON_TIP_PERCENTAGES, o as COMMON_VIEWPORTS, p as CardValidationResult, q as CompoundInterestResult, r as CompoundYearRow, D as Dimensions, F as FilePermissions, s as FormatOptions, I as IbanValidationResult, t as IpConversion, v as IsbnFormat, w as IsbnResult, L as LoanResult, N as NotationStyle, x as NumberBase, P as Permission, y as PxConvertResult, S as SemverVersion, z as SubnetInfo, T as TaxDirection,
|
|
1
|
+
export { A as AmortizationRow, a as AspectRatioResult, B as BASE_LABELS, b as BASE_PREFIXES, c as BYTE_UNITS, d as BarcodeFormat, e as BarcodeValidationResult, f as BaseConvertResult, g as ByteConvertResult, h as ByteUnit, C as COMMON_CURRENCIES, i as COMMON_LOCALES, j as COMMON_PERMISSIONS, k as COMMON_RATIOS, l as COMMON_SIZES, m as COMMON_TAX_RATES, n as COMMON_TIP_PERCENTAGES, o as COMMON_VIEWPORTS, p as CardValidationResult, q as CompoundInterestResult, r as CompoundYearRow, D as Dimensions, F as FilePermissions, s as FormatOptions, I as IbanValidationResult, t as IpConversion, v as IsbnFormat, w as IsbnResult, L as LoanResult, N as NotationStyle, x as NumberBase, P as Permission, y as PxConvertResult, S as SemverVersion, z as SimpleInterestResult, E as SubnetInfo, T as TaxDirection, G as TaxResult, H as TipSplitResult, V as ViewportConvertResult, J as autoFormat, K as bumpVersion, M as calcAspectRatio, O as calcSubnet, Q as calculateCompoundInterest, R as calculateLoan, U as calculateSimpleInterest, W as calculateTax, X as calculateTipSplit, Y as compareSemver, Z as convert, _ as convertBytes, $ as convertIp, a0 as coverBox, a1 as decimalToIp, a2 as decimalToIpCidr, a3 as describePermissions, a4 as fitIntoBox, a5 as formatNumber, a6 as formatValue, a7 as formatVwValue, a8 as formatWithSeparator, a9 as gcd, aa as ipFromBinary, ab as ipFromDecimal, ac as ipFromHex, ad as ipToBinary, ae as ipToDecimal, af as ipToDecimalCidr, ag as ipToHex, ah as ipToOctal, ai as isValid, aj as isValidCidr, ak as isValidIp, al as isValidIpv4, am as octalToPermissions, an as parseFileSize, ao as parseInput, ap as parseNumberString, aq as parseSemver, ar as permissionsToChmod, as as permissionsToOctal, at as permissionsToSymbolic, au as ptToPx, av as pxToAll, aw as pxToViewport, ax as remToPx, ay as satisfiesRange, az as scaleByHeight, aA as scaleByWidth, aB as sortVersions, aC as splitSubnet, aD as symbolicToPermissions, aE as validateBarcode, aF as validateCardNumber, aG as validateIban, aH as validateIsbn, aI as viewportToPx } from '../units-CkV4kAIs.cjs';
|
package/dist/tools/units.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AspectRatioResult, B as BASE_LABELS, b as BASE_PREFIXES, c as BYTE_UNITS, d as BarcodeFormat, e as BarcodeValidationResult, f as BaseConvertResult, g as ByteConvertResult, h as ByteUnit, C as COMMON_CURRENCIES, i as COMMON_LOCALES, j as COMMON_PERMISSIONS, k as COMMON_RATIOS, l as COMMON_SIZES, m as COMMON_TAX_RATES, n as COMMON_TIP_PERCENTAGES, o as COMMON_VIEWPORTS, p as CardValidationResult, q as CompoundInterestResult, r as CompoundYearRow, D as Dimensions, F as FilePermissions, s as FormatOptions, I as IbanValidationResult, t as IpConversion, v as IsbnFormat, w as IsbnResult, L as LoanResult, N as NotationStyle, x as NumberBase, P as Permission, y as PxConvertResult, S as SemverVersion, z as SubnetInfo, T as TaxDirection,
|
|
1
|
+
export { A as AmortizationRow, a as AspectRatioResult, B as BASE_LABELS, b as BASE_PREFIXES, c as BYTE_UNITS, d as BarcodeFormat, e as BarcodeValidationResult, f as BaseConvertResult, g as ByteConvertResult, h as ByteUnit, C as COMMON_CURRENCIES, i as COMMON_LOCALES, j as COMMON_PERMISSIONS, k as COMMON_RATIOS, l as COMMON_SIZES, m as COMMON_TAX_RATES, n as COMMON_TIP_PERCENTAGES, o as COMMON_VIEWPORTS, p as CardValidationResult, q as CompoundInterestResult, r as CompoundYearRow, D as Dimensions, F as FilePermissions, s as FormatOptions, I as IbanValidationResult, t as IpConversion, v as IsbnFormat, w as IsbnResult, L as LoanResult, N as NotationStyle, x as NumberBase, P as Permission, y as PxConvertResult, S as SemverVersion, z as SimpleInterestResult, E as SubnetInfo, T as TaxDirection, G as TaxResult, H as TipSplitResult, V as ViewportConvertResult, J as autoFormat, K as bumpVersion, M as calcAspectRatio, O as calcSubnet, Q as calculateCompoundInterest, R as calculateLoan, U as calculateSimpleInterest, W as calculateTax, X as calculateTipSplit, Y as compareSemver, Z as convert, _ as convertBytes, $ as convertIp, a0 as coverBox, a1 as decimalToIp, a2 as decimalToIpCidr, a3 as describePermissions, a4 as fitIntoBox, a5 as formatNumber, a6 as formatValue, a7 as formatVwValue, a8 as formatWithSeparator, a9 as gcd, aa as ipFromBinary, ab as ipFromDecimal, ac as ipFromHex, ad as ipToBinary, ae as ipToDecimal, af as ipToDecimalCidr, ag as ipToHex, ah as ipToOctal, ai as isValid, aj as isValidCidr, ak as isValidIp, al as isValidIpv4, am as octalToPermissions, an as parseFileSize, ao as parseInput, ap as parseNumberString, aq as parseSemver, ar as permissionsToChmod, as as permissionsToOctal, at as permissionsToSymbolic, au as ptToPx, av as pxToAll, aw as pxToViewport, ax as remToPx, ay as satisfiesRange, az as scaleByHeight, aA as scaleByWidth, aB as sortVersions, aC as splitSubnet, aD as symbolicToPermissions, aE as validateBarcode, aF as validateCardNumber, aG as validateIban, aH as validateIsbn, aI as viewportToPx } from '../units-CkV4kAIs.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, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateCompoundInterest, calculateLoan, calculateTax, calculateTipSplit, compareSemver, convert, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, 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, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateCompoundInterest, calculateLoan, calculateSimpleInterest, calculateTax, calculateTipSplit, compareSemver, convert, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, 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-M4MMO6C6.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* - compound-interest-calculator : calculateCompoundInterest
|
|
21
21
|
* - isbn-validator : validateIsbn
|
|
22
22
|
* - tip-calculator : calculateTipSplit
|
|
23
|
+
* - simple-interest-calculator : calculateSimpleInterest
|
|
23
24
|
*/
|
|
24
25
|
interface PxConvertResult {
|
|
25
26
|
px: number;
|
|
@@ -387,6 +388,22 @@ declare const COMMON_TIP_PERCENTAGES: number[];
|
|
|
387
388
|
declare function calculateTipSplit(billAmount: number, tipPercent: number, numPeople?: number): TipSplitResult | {
|
|
388
389
|
error: string;
|
|
389
390
|
};
|
|
391
|
+
interface SimpleInterestResult {
|
|
392
|
+
principal: number;
|
|
393
|
+
annualRatePercent: number;
|
|
394
|
+
years: number;
|
|
395
|
+
interest: number;
|
|
396
|
+
totalPayoff: number;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Compute simple (non-compounding) interest: interest = principal × rate ×
|
|
400
|
+
* time. Distinct from calculateCompoundInterest, which reinvests interest
|
|
401
|
+
* each period; this is the flat-rate formula commonly used for short-term
|
|
402
|
+
* loans and bonds.
|
|
403
|
+
*/
|
|
404
|
+
declare function calculateSimpleInterest(principal: number, annualRatePercent: number, years: number): SimpleInterestResult | {
|
|
405
|
+
error: string;
|
|
406
|
+
};
|
|
390
407
|
|
|
391
408
|
type units_AmortizationRow = AmortizationRow;
|
|
392
409
|
type units_AspectRatioResult = AspectRatioResult;
|
|
@@ -422,6 +439,7 @@ type units_NumberBase = NumberBase;
|
|
|
422
439
|
type units_Permission = Permission;
|
|
423
440
|
type units_PxConvertResult = PxConvertResult;
|
|
424
441
|
type units_SemverVersion = SemverVersion;
|
|
442
|
+
type units_SimpleInterestResult = SimpleInterestResult;
|
|
425
443
|
type units_SubnetInfo = SubnetInfo;
|
|
426
444
|
type units_TaxDirection = TaxDirection;
|
|
427
445
|
type units_TaxResult = TaxResult;
|
|
@@ -433,6 +451,7 @@ declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
|
433
451
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
434
452
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
435
453
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
454
|
+
declare const units_calculateSimpleInterest: typeof calculateSimpleInterest;
|
|
436
455
|
declare const units_calculateTax: typeof calculateTax;
|
|
437
456
|
declare const units_calculateTipSplit: typeof calculateTipSplit;
|
|
438
457
|
declare const units_compareSemver: typeof compareSemver;
|
|
@@ -485,7 +504,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
485
504
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
486
505
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
487
506
|
declare namespace units {
|
|
488
|
-
export { type units_AmortizationRow as AmortizationRow, 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_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_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_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SubnetInfo as SubnetInfo, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TipSplitResult as TipSplitResult, type units_ViewportConvertResult as ViewportConvertResult, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateLoan as calculateLoan, units_calculateTax as calculateTax, units_calculateTipSplit as calculateTipSplit, units_compareSemver as compareSemver, units_convert as convert, 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_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 };
|
|
507
|
+
export { type units_AmortizationRow as AmortizationRow, 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_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_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_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TipSplitResult as TipSplitResult, type units_ViewportConvertResult as ViewportConvertResult, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateLoan as calculateLoan, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTipSplit as calculateTipSplit, units_compareSemver as compareSemver, units_convert as convert, 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_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 };
|
|
489
508
|
}
|
|
490
509
|
|
|
491
|
-
export {
|
|
510
|
+
export { convertIp as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type Dimensions as D, type SubnetInfo as E, type FilePermissions as F, type TaxResult as G, type TipSplitResult as H, type IbanValidationResult as I, autoFormat as J, bumpVersion as K, type LoanResult as L, calcAspectRatio as M, type NotationStyle as N, calcSubnet as O, type Permission as P, calculateCompoundInterest as Q, calculateLoan as R, type SemverVersion as S, type TaxDirection as T, calculateSimpleInterest as U, type ViewportConvertResult as V, calculateTax as W, calculateTipSplit as X, compareSemver as Y, convert as Z, convertBytes as _, type AspectRatioResult as a, coverBox as a0, decimalToIp as a1, decimalToIpCidr as a2, describePermissions as a3, fitIntoBox as a4, formatNumber as a5, formatValue as a6, formatVwValue as a7, formatWithSeparator as a8, gcd as a9, scaleByWidth as aA, sortVersions as aB, splitSubnet as aC, symbolicToPermissions as aD, validateBarcode as aE, validateCardNumber as aF, validateIban as aG, validateIsbn as aH, viewportToPx as aI, ipFromBinary as aa, ipFromDecimal as ab, ipFromHex as ac, ipToBinary as ad, ipToDecimal as ae, ipToDecimalCidr as af, ipToHex as ag, ipToOctal as ah, isValid as ai, isValidCidr as aj, isValidIp as ak, isValidIpv4 as al, octalToPermissions as am, parseFileSize as an, parseInput as ao, parseNumberString as ap, parseSemver as aq, permissionsToChmod as ar, permissionsToOctal as as, permissionsToSymbolic as at, ptToPx as au, pxToAll as av, pxToViewport as aw, remToPx as ax, satisfiesRange as ay, scaleByHeight as az, BASE_PREFIXES as b, BYTE_UNITS as c, type BarcodeFormat as d, type BarcodeValidationResult as e, type BaseConvertResult as f, type ByteConvertResult as g, type ByteUnit as h, COMMON_LOCALES as i, COMMON_PERMISSIONS as j, COMMON_RATIOS as k, COMMON_SIZES as l, COMMON_TAX_RATES as m, COMMON_TIP_PERCENTAGES as n, COMMON_VIEWPORTS as o, type CardValidationResult as p, type CompoundInterestResult as q, type CompoundYearRow as r, type FormatOptions as s, type IpConversion as t, units as u, type IsbnFormat as v, type IsbnResult as w, type NumberBase as x, type PxConvertResult as y, type SimpleInterestResult as z };
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* - compound-interest-calculator : calculateCompoundInterest
|
|
21
21
|
* - isbn-validator : validateIsbn
|
|
22
22
|
* - tip-calculator : calculateTipSplit
|
|
23
|
+
* - simple-interest-calculator : calculateSimpleInterest
|
|
23
24
|
*/
|
|
24
25
|
interface PxConvertResult {
|
|
25
26
|
px: number;
|
|
@@ -387,6 +388,22 @@ declare const COMMON_TIP_PERCENTAGES: number[];
|
|
|
387
388
|
declare function calculateTipSplit(billAmount: number, tipPercent: number, numPeople?: number): TipSplitResult | {
|
|
388
389
|
error: string;
|
|
389
390
|
};
|
|
391
|
+
interface SimpleInterestResult {
|
|
392
|
+
principal: number;
|
|
393
|
+
annualRatePercent: number;
|
|
394
|
+
years: number;
|
|
395
|
+
interest: number;
|
|
396
|
+
totalPayoff: number;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Compute simple (non-compounding) interest: interest = principal × rate ×
|
|
400
|
+
* time. Distinct from calculateCompoundInterest, which reinvests interest
|
|
401
|
+
* each period; this is the flat-rate formula commonly used for short-term
|
|
402
|
+
* loans and bonds.
|
|
403
|
+
*/
|
|
404
|
+
declare function calculateSimpleInterest(principal: number, annualRatePercent: number, years: number): SimpleInterestResult | {
|
|
405
|
+
error: string;
|
|
406
|
+
};
|
|
390
407
|
|
|
391
408
|
type units_AmortizationRow = AmortizationRow;
|
|
392
409
|
type units_AspectRatioResult = AspectRatioResult;
|
|
@@ -422,6 +439,7 @@ type units_NumberBase = NumberBase;
|
|
|
422
439
|
type units_Permission = Permission;
|
|
423
440
|
type units_PxConvertResult = PxConvertResult;
|
|
424
441
|
type units_SemverVersion = SemverVersion;
|
|
442
|
+
type units_SimpleInterestResult = SimpleInterestResult;
|
|
425
443
|
type units_SubnetInfo = SubnetInfo;
|
|
426
444
|
type units_TaxDirection = TaxDirection;
|
|
427
445
|
type units_TaxResult = TaxResult;
|
|
@@ -433,6 +451,7 @@ declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
|
433
451
|
declare const units_calcSubnet: typeof calcSubnet;
|
|
434
452
|
declare const units_calculateCompoundInterest: typeof calculateCompoundInterest;
|
|
435
453
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
454
|
+
declare const units_calculateSimpleInterest: typeof calculateSimpleInterest;
|
|
436
455
|
declare const units_calculateTax: typeof calculateTax;
|
|
437
456
|
declare const units_calculateTipSplit: typeof calculateTipSplit;
|
|
438
457
|
declare const units_compareSemver: typeof compareSemver;
|
|
@@ -485,7 +504,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
485
504
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
486
505
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
487
506
|
declare namespace units {
|
|
488
|
-
export { type units_AmortizationRow as AmortizationRow, 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_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_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_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SubnetInfo as SubnetInfo, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TipSplitResult as TipSplitResult, type units_ViewportConvertResult as ViewportConvertResult, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateLoan as calculateLoan, units_calculateTax as calculateTax, units_calculateTipSplit as calculateTipSplit, units_compareSemver as compareSemver, units_convert as convert, 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_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 };
|
|
507
|
+
export { type units_AmortizationRow as AmortizationRow, 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_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_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_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TipSplitResult as TipSplitResult, type units_ViewportConvertResult as ViewportConvertResult, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateLoan as calculateLoan, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTipSplit as calculateTipSplit, units_compareSemver as compareSemver, units_convert as convert, 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_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 };
|
|
489
508
|
}
|
|
490
509
|
|
|
491
|
-
export {
|
|
510
|
+
export { convertIp as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type Dimensions as D, type SubnetInfo as E, type FilePermissions as F, type TaxResult as G, type TipSplitResult as H, type IbanValidationResult as I, autoFormat as J, bumpVersion as K, type LoanResult as L, calcAspectRatio as M, type NotationStyle as N, calcSubnet as O, type Permission as P, calculateCompoundInterest as Q, calculateLoan as R, type SemverVersion as S, type TaxDirection as T, calculateSimpleInterest as U, type ViewportConvertResult as V, calculateTax as W, calculateTipSplit as X, compareSemver as Y, convert as Z, convertBytes as _, type AspectRatioResult as a, coverBox as a0, decimalToIp as a1, decimalToIpCidr as a2, describePermissions as a3, fitIntoBox as a4, formatNumber as a5, formatValue as a6, formatVwValue as a7, formatWithSeparator as a8, gcd as a9, scaleByWidth as aA, sortVersions as aB, splitSubnet as aC, symbolicToPermissions as aD, validateBarcode as aE, validateCardNumber as aF, validateIban as aG, validateIsbn as aH, viewportToPx as aI, ipFromBinary as aa, ipFromDecimal as ab, ipFromHex as ac, ipToBinary as ad, ipToDecimal as ae, ipToDecimalCidr as af, ipToHex as ag, ipToOctal as ah, isValid as ai, isValidCidr as aj, isValidIp as ak, isValidIpv4 as al, octalToPermissions as am, parseFileSize as an, parseInput as ao, parseNumberString as ap, parseSemver as aq, permissionsToChmod as ar, permissionsToOctal as as, permissionsToSymbolic as at, ptToPx as au, pxToAll as av, pxToViewport as aw, remToPx as ax, satisfiesRange as ay, scaleByHeight as az, BASE_PREFIXES as b, BYTE_UNITS as c, type BarcodeFormat as d, type BarcodeValidationResult as e, type BaseConvertResult as f, type ByteConvertResult as g, type ByteUnit as h, COMMON_LOCALES as i, COMMON_PERMISSIONS as j, COMMON_RATIOS as k, COMMON_SIZES as l, COMMON_TAX_RATES as m, COMMON_TIP_PERCENTAGES as n, COMMON_VIEWPORTS as o, type CardValidationResult as p, type CompoundInterestResult as q, type CompoundYearRow as r, type FormatOptions as s, type IpConversion as t, units as u, type IsbnFormat as v, type IsbnResult as w, type NumberBase as x, type PxConvertResult as y, type SimpleInterestResult as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilix-tech/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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",
|