@utilix-tech/sdk 0.97.0 → 0.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +9 -1
- package/dist/{chunk-WUOZHCIC.js → chunk-PAMHORKV.js} +167 -1
- package/dist/{chunk-NFTUG3XP.js → chunk-X7IZ2OXW.js} +115 -1
- package/dist/index.cjs +280 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{json-Ca6gZCNB.d.cts → json-BtRszk1w.d.cts} +28 -2
- package/dist/{json-Ca6gZCNB.d.ts → json-BtRszk1w.d.ts} +28 -2
- package/dist/tools/json.cjs +166 -0
- package/dist/tools/json.d.cts +1 -1
- package/dist/tools/json.d.ts +1 -1
- package/dist/tools/json.js +1 -1
- package/dist/tools/units.cjs +114 -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-7rkeDBbW.d.cts → units-CGTx1S6B.d.cts} +39 -2
- package/dist/{units-7rkeDBbW.d.ts → units-CGTx1S6B.d.ts} +39 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { j as json } from './json-
|
|
1
|
+
export { j as json } from './json-BtRszk1w.cjs';
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.cjs';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.cjs';
|
|
4
4
|
export { t as text } from './text-DFCNpyvH.cjs';
|
|
5
5
|
export { d as data } from './data-Dg5dEwWl.cjs';
|
|
6
6
|
export { g as generators } from './generators-DAXXrMvG.cjs';
|
|
7
7
|
export { t as time } from './time-VMAy_SrV.cjs';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-CGTx1S6B.cjs';
|
|
9
9
|
export { n as network } from './network-B6fQrsCc.cjs';
|
|
10
10
|
export { a as api } from './api-CQnIUrVB.cjs';
|
|
11
11
|
export { c as code } from './code-CZHElFHu.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { j as json } from './json-
|
|
1
|
+
export { j as json } from './json-BtRszk1w.js';
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.js';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.js';
|
|
4
4
|
export { t as text } from './text-DFCNpyvH.js';
|
|
5
5
|
export { d as data } from './data-Dg5dEwWl.js';
|
|
6
6
|
export { g as generators } from './generators-DAXXrMvG.js';
|
|
7
7
|
export { t as time } from './time-VMAy_SrV.js';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-CGTx1S6B.js';
|
|
9
9
|
export { n as network } from './network-B6fQrsCc.js';
|
|
10
10
|
export { a as api } from './api-CQnIUrVB.js';
|
|
11
11
|
export { c as code } from './code-CZHElFHu.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { media_exports as media } from './chunk-YSS4VVZU.js';
|
|
2
|
-
export { units_exports as units } from './chunk-
|
|
2
|
+
export { units_exports as units } from './chunk-X7IZ2OXW.js';
|
|
3
3
|
export { network_exports as network } from './chunk-K242OOF4.js';
|
|
4
4
|
export { api_exports as api } from './chunk-U2HREMZU.js';
|
|
5
5
|
export { code_exports as code } from './chunk-KRPIOHJ4.js';
|
|
@@ -7,7 +7,7 @@ export { color_exports as color } from './chunk-BPVAB4P2.js';
|
|
|
7
7
|
export { css_exports as css } from './chunk-6YPV2AB5.js';
|
|
8
8
|
export { misc_exports as misc } from './chunk-GX7H6TAX.js';
|
|
9
9
|
export { ai_agent_exports as ai_agent } from './chunk-5VVC7BHS.js';
|
|
10
|
-
export { json_exports as json } from './chunk-
|
|
10
|
+
export { json_exports as json } from './chunk-PAMHORKV.js';
|
|
11
11
|
export { encoding_exports as encoding } from './chunk-DOWQZUTP.js';
|
|
12
12
|
export { hashing_exports as hashing } from './chunk-PET2CGTH.js';
|
|
13
13
|
export { text_exports as text } from './chunk-2YWKRNDM.js';
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - json-schema-to-typescript : jsonSchemaToTypescript
|
|
17
17
|
* - json-merge-patch : mergeJsonPatch, applyJsonMergePatch
|
|
18
18
|
* - json-patch : diffJsonPatch, applyJsonPatch, generateJsonPatch
|
|
19
|
+
* - geojson-validator : validateGeoJson
|
|
19
20
|
*/
|
|
20
21
|
type ParseStatus = 'idle' | 'valid' | 'error';
|
|
21
22
|
interface JsonParseResult {
|
|
@@ -258,11 +259,35 @@ declare function generateJsonPatch(aJson: string, bJson: string): {
|
|
|
258
259
|
} | {
|
|
259
260
|
error: string;
|
|
260
261
|
};
|
|
262
|
+
interface GeoJsonIssue {
|
|
263
|
+
path: string;
|
|
264
|
+
message: string;
|
|
265
|
+
}
|
|
266
|
+
interface GeoJsonValidateResult {
|
|
267
|
+
valid: boolean;
|
|
268
|
+
type: string | null;
|
|
269
|
+
errors: GeoJsonIssue[];
|
|
270
|
+
warnings: GeoJsonIssue[];
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Validate a GeoJSON document's structure against RFC 7946: the correct
|
|
274
|
+
* geometry type and coordinates shape for each of the seven geometry types,
|
|
275
|
+
* linear ring closure (first and last position identical) for Polygon and
|
|
276
|
+
* MultiPolygon, a Feature's required `properties`/`geometry` members, and a
|
|
277
|
+
* FeatureCollection's required `features` array. Also warns, without
|
|
278
|
+
* failing validation, when a Polygon ring winds the "wrong" way under RFC
|
|
279
|
+
* 7946's right-hand rule, since that's a SHOULD, not a MUST, and plenty of
|
|
280
|
+
* real-world producers don't follow it. Pure structural validation; no map
|
|
281
|
+
* is rendered and no tile server is ever contacted.
|
|
282
|
+
*/
|
|
283
|
+
declare function validateGeoJson(input: string | object): GeoJsonValidateResult;
|
|
261
284
|
|
|
262
285
|
type json_ConvertOptions = ConvertOptions;
|
|
263
286
|
type json_CsvOptions = CsvOptions;
|
|
264
287
|
type json_DiffNode = DiffNode;
|
|
265
288
|
type json_DiffType = DiffType;
|
|
289
|
+
type json_GeoJsonIssue = GeoJsonIssue;
|
|
290
|
+
type json_GeoJsonValidateResult = GeoJsonValidateResult;
|
|
266
291
|
type json_GoField = GoField;
|
|
267
292
|
type json_GoStruct = GoStruct;
|
|
268
293
|
type json_JsonDiffResult = JsonDiffResult;
|
|
@@ -310,12 +335,13 @@ declare const json_parseStructs: typeof parseStructs;
|
|
|
310
335
|
declare const json_resolveJsonPointer: typeof resolveJsonPointer;
|
|
311
336
|
declare const json_toPascalCase: typeof toPascalCase;
|
|
312
337
|
declare const json_toSnakeCase: typeof toSnakeCase;
|
|
338
|
+
declare const json_validateGeoJson: typeof validateGeoJson;
|
|
313
339
|
declare const json_validateJson: typeof validateJson;
|
|
314
340
|
declare const json_validateJsonPath: typeof validateJsonPath;
|
|
315
341
|
declare const json_validateJsonString: typeof validateJsonString;
|
|
316
342
|
declare const json_yamlToJson: typeof yamlToJson;
|
|
317
343
|
declare namespace json {
|
|
318
|
-
export { type json_ConvertOptions as ConvertOptions, type json_CsvOptions as CsvOptions, type json_DiffNode as DiffNode, type json_DiffType as DiffType, type json_GoField as GoField, type json_GoStruct as GoStruct, type json_JsonDiffResult as JsonDiffResult, type json_JsonParseResult as JsonParseResult, type json_JsonPatchOp as JsonPatchOp, type json_JsonPatchOperation as JsonPatchOperation, type json_JsonPathResult as JsonPathResult, type json_JsonPointerResult as JsonPointerResult, type json_JsonSchemaLike as JsonSchemaLike, type json_JsonSchemaToTsOptions as JsonSchemaToTsOptions, type json_MergePatchResult as MergePatchResult, type json_ParseStatus as ParseStatus, type json_PythonClass as PythonClass, type json_PythonField as PythonField, type json_PythonMode as PythonMode, type json_ValidationError as ValidationError, type json_ValidationResult as ValidationResult, type json_ZodOptions as ZodOptions, json_applyJsonMergePatch as applyJsonMergePatch, json_applyJsonPatch as applyJsonPatch, json_csvToJson as csvToJson, json_detectFormat as detectFormat, json_diffJson as diffJson, json_diffJsonPatch as diffJsonPatch, json_evaluateJsonPath as evaluateJsonPath, json_formatDiffLine as formatDiffLine, json_formatJson as formatJson, json_generateExample as generateExample, json_generateJsonPatch as generateJsonPatch, json_getJsonStats as getJsonStats, json_inferGoType as inferGoType, json_inferPythonType as inferPythonType, json_inferType as inferType, json_jsonSchemaToTypescript as jsonSchemaToTypescript, json_jsonToCsv as jsonToCsv, json_jsonToGo as jsonToGo, json_jsonToPython as jsonToPython, json_jsonToTypescript as jsonToTypescript, json_jsonToYaml as jsonToYaml, json_jsonToZod as jsonToZod, json_mergeJsonPatch as mergeJsonPatch, json_minifyJson as minifyJson, json_parseJson as parseJson, json_parseStructs as parseStructs, json_resolveJsonPointer as resolveJsonPointer, json_toPascalCase as toPascalCase, json_toSnakeCase as toSnakeCase, json_validateJson as validateJson, json_validateJsonPath as validateJsonPath, json_validateJsonString as validateJsonString, json_yamlToJson as yamlToJson };
|
|
344
|
+
export { type json_ConvertOptions as ConvertOptions, type json_CsvOptions as CsvOptions, type json_DiffNode as DiffNode, type json_DiffType as DiffType, type json_GeoJsonIssue as GeoJsonIssue, type json_GeoJsonValidateResult as GeoJsonValidateResult, type json_GoField as GoField, type json_GoStruct as GoStruct, type json_JsonDiffResult as JsonDiffResult, type json_JsonParseResult as JsonParseResult, type json_JsonPatchOp as JsonPatchOp, type json_JsonPatchOperation as JsonPatchOperation, type json_JsonPathResult as JsonPathResult, type json_JsonPointerResult as JsonPointerResult, type json_JsonSchemaLike as JsonSchemaLike, type json_JsonSchemaToTsOptions as JsonSchemaToTsOptions, type json_MergePatchResult as MergePatchResult, type json_ParseStatus as ParseStatus, type json_PythonClass as PythonClass, type json_PythonField as PythonField, type json_PythonMode as PythonMode, type json_ValidationError as ValidationError, type json_ValidationResult as ValidationResult, type json_ZodOptions as ZodOptions, json_applyJsonMergePatch as applyJsonMergePatch, json_applyJsonPatch as applyJsonPatch, json_csvToJson as csvToJson, json_detectFormat as detectFormat, json_diffJson as diffJson, json_diffJsonPatch as diffJsonPatch, json_evaluateJsonPath as evaluateJsonPath, json_formatDiffLine as formatDiffLine, json_formatJson as formatJson, json_generateExample as generateExample, json_generateJsonPatch as generateJsonPatch, json_getJsonStats as getJsonStats, json_inferGoType as inferGoType, json_inferPythonType as inferPythonType, json_inferType as inferType, json_jsonSchemaToTypescript as jsonSchemaToTypescript, json_jsonToCsv as jsonToCsv, json_jsonToGo as jsonToGo, json_jsonToPython as jsonToPython, json_jsonToTypescript as jsonToTypescript, json_jsonToYaml as jsonToYaml, json_jsonToZod as jsonToZod, json_mergeJsonPatch as mergeJsonPatch, json_minifyJson as minifyJson, json_parseJson as parseJson, json_parseStructs as parseStructs, json_resolveJsonPointer as resolveJsonPointer, json_toPascalCase as toPascalCase, json_toSnakeCase as toSnakeCase, json_validateGeoJson as validateGeoJson, json_validateJson as validateJson, json_validateJsonPath as validateJsonPath, json_validateJsonString as validateJsonString, json_yamlToJson as yamlToJson };
|
|
319
345
|
}
|
|
320
346
|
|
|
321
|
-
export {
|
|
347
|
+
export { toSnakeCase as $, generateExample as A, generateJsonPatch as B, type ConvertOptions as C, type DiffNode as D, getJsonStats as E, inferGoType as F, type GeoJsonIssue as G, inferPythonType as H, inferType as I, type JsonDiffResult as J, jsonSchemaToTypescript as K, jsonToCsv as L, type MergePatchResult as M, jsonToGo as N, jsonToPython as O, type ParseStatus as P, jsonToTypescript as Q, jsonToYaml as R, jsonToZod as S, mergeJsonPatch as T, minifyJson as U, type ValidationError as V, parseJson as W, parseStructs as X, resolveJsonPointer as Y, type ZodOptions as Z, toPascalCase as _, type CsvOptions as a, validateGeoJson as a0, validateJson as a1, validateJsonPath as a2, validateJsonString as a3, yamlToJson as a4, type DiffType as b, type GeoJsonValidateResult as c, type GoField as d, type GoStruct as e, type JsonParseResult as f, type JsonPatchOp as g, type JsonPatchOperation as h, type JsonPathResult as i, json as j, type JsonPointerResult as k, type JsonSchemaLike as l, type JsonSchemaToTsOptions as m, type PythonClass as n, type PythonField as o, type PythonMode as p, type ValidationResult as q, applyJsonMergePatch as r, applyJsonPatch as s, csvToJson as t, detectFormat as u, diffJson as v, diffJsonPatch as w, evaluateJsonPath as x, formatDiffLine as y, formatJson as z };
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - json-schema-to-typescript : jsonSchemaToTypescript
|
|
17
17
|
* - json-merge-patch : mergeJsonPatch, applyJsonMergePatch
|
|
18
18
|
* - json-patch : diffJsonPatch, applyJsonPatch, generateJsonPatch
|
|
19
|
+
* - geojson-validator : validateGeoJson
|
|
19
20
|
*/
|
|
20
21
|
type ParseStatus = 'idle' | 'valid' | 'error';
|
|
21
22
|
interface JsonParseResult {
|
|
@@ -258,11 +259,35 @@ declare function generateJsonPatch(aJson: string, bJson: string): {
|
|
|
258
259
|
} | {
|
|
259
260
|
error: string;
|
|
260
261
|
};
|
|
262
|
+
interface GeoJsonIssue {
|
|
263
|
+
path: string;
|
|
264
|
+
message: string;
|
|
265
|
+
}
|
|
266
|
+
interface GeoJsonValidateResult {
|
|
267
|
+
valid: boolean;
|
|
268
|
+
type: string | null;
|
|
269
|
+
errors: GeoJsonIssue[];
|
|
270
|
+
warnings: GeoJsonIssue[];
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Validate a GeoJSON document's structure against RFC 7946: the correct
|
|
274
|
+
* geometry type and coordinates shape for each of the seven geometry types,
|
|
275
|
+
* linear ring closure (first and last position identical) for Polygon and
|
|
276
|
+
* MultiPolygon, a Feature's required `properties`/`geometry` members, and a
|
|
277
|
+
* FeatureCollection's required `features` array. Also warns, without
|
|
278
|
+
* failing validation, when a Polygon ring winds the "wrong" way under RFC
|
|
279
|
+
* 7946's right-hand rule, since that's a SHOULD, not a MUST, and plenty of
|
|
280
|
+
* real-world producers don't follow it. Pure structural validation; no map
|
|
281
|
+
* is rendered and no tile server is ever contacted.
|
|
282
|
+
*/
|
|
283
|
+
declare function validateGeoJson(input: string | object): GeoJsonValidateResult;
|
|
261
284
|
|
|
262
285
|
type json_ConvertOptions = ConvertOptions;
|
|
263
286
|
type json_CsvOptions = CsvOptions;
|
|
264
287
|
type json_DiffNode = DiffNode;
|
|
265
288
|
type json_DiffType = DiffType;
|
|
289
|
+
type json_GeoJsonIssue = GeoJsonIssue;
|
|
290
|
+
type json_GeoJsonValidateResult = GeoJsonValidateResult;
|
|
266
291
|
type json_GoField = GoField;
|
|
267
292
|
type json_GoStruct = GoStruct;
|
|
268
293
|
type json_JsonDiffResult = JsonDiffResult;
|
|
@@ -310,12 +335,13 @@ declare const json_parseStructs: typeof parseStructs;
|
|
|
310
335
|
declare const json_resolveJsonPointer: typeof resolveJsonPointer;
|
|
311
336
|
declare const json_toPascalCase: typeof toPascalCase;
|
|
312
337
|
declare const json_toSnakeCase: typeof toSnakeCase;
|
|
338
|
+
declare const json_validateGeoJson: typeof validateGeoJson;
|
|
313
339
|
declare const json_validateJson: typeof validateJson;
|
|
314
340
|
declare const json_validateJsonPath: typeof validateJsonPath;
|
|
315
341
|
declare const json_validateJsonString: typeof validateJsonString;
|
|
316
342
|
declare const json_yamlToJson: typeof yamlToJson;
|
|
317
343
|
declare namespace json {
|
|
318
|
-
export { type json_ConvertOptions as ConvertOptions, type json_CsvOptions as CsvOptions, type json_DiffNode as DiffNode, type json_DiffType as DiffType, type json_GoField as GoField, type json_GoStruct as GoStruct, type json_JsonDiffResult as JsonDiffResult, type json_JsonParseResult as JsonParseResult, type json_JsonPatchOp as JsonPatchOp, type json_JsonPatchOperation as JsonPatchOperation, type json_JsonPathResult as JsonPathResult, type json_JsonPointerResult as JsonPointerResult, type json_JsonSchemaLike as JsonSchemaLike, type json_JsonSchemaToTsOptions as JsonSchemaToTsOptions, type json_MergePatchResult as MergePatchResult, type json_ParseStatus as ParseStatus, type json_PythonClass as PythonClass, type json_PythonField as PythonField, type json_PythonMode as PythonMode, type json_ValidationError as ValidationError, type json_ValidationResult as ValidationResult, type json_ZodOptions as ZodOptions, json_applyJsonMergePatch as applyJsonMergePatch, json_applyJsonPatch as applyJsonPatch, json_csvToJson as csvToJson, json_detectFormat as detectFormat, json_diffJson as diffJson, json_diffJsonPatch as diffJsonPatch, json_evaluateJsonPath as evaluateJsonPath, json_formatDiffLine as formatDiffLine, json_formatJson as formatJson, json_generateExample as generateExample, json_generateJsonPatch as generateJsonPatch, json_getJsonStats as getJsonStats, json_inferGoType as inferGoType, json_inferPythonType as inferPythonType, json_inferType as inferType, json_jsonSchemaToTypescript as jsonSchemaToTypescript, json_jsonToCsv as jsonToCsv, json_jsonToGo as jsonToGo, json_jsonToPython as jsonToPython, json_jsonToTypescript as jsonToTypescript, json_jsonToYaml as jsonToYaml, json_jsonToZod as jsonToZod, json_mergeJsonPatch as mergeJsonPatch, json_minifyJson as minifyJson, json_parseJson as parseJson, json_parseStructs as parseStructs, json_resolveJsonPointer as resolveJsonPointer, json_toPascalCase as toPascalCase, json_toSnakeCase as toSnakeCase, json_validateJson as validateJson, json_validateJsonPath as validateJsonPath, json_validateJsonString as validateJsonString, json_yamlToJson as yamlToJson };
|
|
344
|
+
export { type json_ConvertOptions as ConvertOptions, type json_CsvOptions as CsvOptions, type json_DiffNode as DiffNode, type json_DiffType as DiffType, type json_GeoJsonIssue as GeoJsonIssue, type json_GeoJsonValidateResult as GeoJsonValidateResult, type json_GoField as GoField, type json_GoStruct as GoStruct, type json_JsonDiffResult as JsonDiffResult, type json_JsonParseResult as JsonParseResult, type json_JsonPatchOp as JsonPatchOp, type json_JsonPatchOperation as JsonPatchOperation, type json_JsonPathResult as JsonPathResult, type json_JsonPointerResult as JsonPointerResult, type json_JsonSchemaLike as JsonSchemaLike, type json_JsonSchemaToTsOptions as JsonSchemaToTsOptions, type json_MergePatchResult as MergePatchResult, type json_ParseStatus as ParseStatus, type json_PythonClass as PythonClass, type json_PythonField as PythonField, type json_PythonMode as PythonMode, type json_ValidationError as ValidationError, type json_ValidationResult as ValidationResult, type json_ZodOptions as ZodOptions, json_applyJsonMergePatch as applyJsonMergePatch, json_applyJsonPatch as applyJsonPatch, json_csvToJson as csvToJson, json_detectFormat as detectFormat, json_diffJson as diffJson, json_diffJsonPatch as diffJsonPatch, json_evaluateJsonPath as evaluateJsonPath, json_formatDiffLine as formatDiffLine, json_formatJson as formatJson, json_generateExample as generateExample, json_generateJsonPatch as generateJsonPatch, json_getJsonStats as getJsonStats, json_inferGoType as inferGoType, json_inferPythonType as inferPythonType, json_inferType as inferType, json_jsonSchemaToTypescript as jsonSchemaToTypescript, json_jsonToCsv as jsonToCsv, json_jsonToGo as jsonToGo, json_jsonToPython as jsonToPython, json_jsonToTypescript as jsonToTypescript, json_jsonToYaml as jsonToYaml, json_jsonToZod as jsonToZod, json_mergeJsonPatch as mergeJsonPatch, json_minifyJson as minifyJson, json_parseJson as parseJson, json_parseStructs as parseStructs, json_resolveJsonPointer as resolveJsonPointer, json_toPascalCase as toPascalCase, json_toSnakeCase as toSnakeCase, json_validateGeoJson as validateGeoJson, json_validateJson as validateJson, json_validateJsonPath as validateJsonPath, json_validateJsonString as validateJsonString, json_yamlToJson as yamlToJson };
|
|
319
345
|
}
|
|
320
346
|
|
|
321
|
-
export {
|
|
347
|
+
export { toSnakeCase as $, generateExample as A, generateJsonPatch as B, type ConvertOptions as C, type DiffNode as D, getJsonStats as E, inferGoType as F, type GeoJsonIssue as G, inferPythonType as H, inferType as I, type JsonDiffResult as J, jsonSchemaToTypescript as K, jsonToCsv as L, type MergePatchResult as M, jsonToGo as N, jsonToPython as O, type ParseStatus as P, jsonToTypescript as Q, jsonToYaml as R, jsonToZod as S, mergeJsonPatch as T, minifyJson as U, type ValidationError as V, parseJson as W, parseStructs as X, resolveJsonPointer as Y, type ZodOptions as Z, toPascalCase as _, type CsvOptions as a, validateGeoJson as a0, validateJson as a1, validateJsonPath as a2, validateJsonString as a3, yamlToJson as a4, type DiffType as b, type GeoJsonValidateResult as c, type GoField as d, type GoStruct as e, type JsonParseResult as f, type JsonPatchOp as g, type JsonPatchOperation as h, type JsonPathResult as i, json as j, type JsonPointerResult as k, type JsonSchemaLike as l, type JsonSchemaToTsOptions as m, type PythonClass as n, type PythonField as o, type PythonMode as p, type ValidationResult as q, applyJsonMergePatch as r, applyJsonPatch as s, csvToJson as t, detectFormat as u, diffJson as v, diffJsonPatch as w, evaluateJsonPath as x, formatDiffLine as y, formatJson as z };
|
package/dist/tools/json.cjs
CHANGED
|
@@ -1636,6 +1636,171 @@ function generateJsonPatch(aJson, bJson) {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
return { patch: diffJsonPatch(a, b) };
|
|
1638
1638
|
}
|
|
1639
|
+
var GEOJSON_GEOMETRY_TYPES = /* @__PURE__ */ new Set([
|
|
1640
|
+
"Point",
|
|
1641
|
+
"MultiPoint",
|
|
1642
|
+
"LineString",
|
|
1643
|
+
"MultiLineString",
|
|
1644
|
+
"Polygon",
|
|
1645
|
+
"MultiPolygon",
|
|
1646
|
+
"GeometryCollection"
|
|
1647
|
+
]);
|
|
1648
|
+
function _isGeoJsonNumber(v) {
|
|
1649
|
+
return typeof v === "number" && Number.isFinite(v);
|
|
1650
|
+
}
|
|
1651
|
+
function _isGeoJsonPosition(v) {
|
|
1652
|
+
return Array.isArray(v) && (v.length === 2 || v.length === 3) && v.every(_isGeoJsonNumber);
|
|
1653
|
+
}
|
|
1654
|
+
function _geoJsonPositionsEqual(a, b) {
|
|
1655
|
+
return a.length === b.length && a.every((v, i) => v === b[i]);
|
|
1656
|
+
}
|
|
1657
|
+
function _geoJsonRingSignedArea(ring) {
|
|
1658
|
+
let sum = 0;
|
|
1659
|
+
for (let i = 0; i < ring.length - 1; i++) {
|
|
1660
|
+
const [x1, y1] = ring[i];
|
|
1661
|
+
const [x2, y2] = ring[i + 1];
|
|
1662
|
+
sum += x1 * y2 - x2 * y1;
|
|
1663
|
+
}
|
|
1664
|
+
return sum / 2;
|
|
1665
|
+
}
|
|
1666
|
+
function _validateGeoJsonPolygonCoords(coords, path, errors, warnings) {
|
|
1667
|
+
if (!Array.isArray(coords) || coords.length === 0) {
|
|
1668
|
+
errors.push({ path, message: "Polygon coordinates must be a non-empty array of linear rings" });
|
|
1669
|
+
return;
|
|
1670
|
+
}
|
|
1671
|
+
coords.forEach((ring, i) => {
|
|
1672
|
+
const ringPath = `${path}[${i}]`;
|
|
1673
|
+
if (!Array.isArray(ring) || ring.length < 4 || !ring.every(_isGeoJsonPosition)) {
|
|
1674
|
+
errors.push({ path: ringPath, message: "each linear ring must have at least 4 positions" });
|
|
1675
|
+
return;
|
|
1676
|
+
}
|
|
1677
|
+
const first = ring[0];
|
|
1678
|
+
const last = ring[ring.length - 1];
|
|
1679
|
+
if (!_geoJsonPositionsEqual(first, last)) {
|
|
1680
|
+
errors.push({ path: ringPath, message: "the first and last positions of a linear ring must be identical (the ring must be closed)" });
|
|
1681
|
+
return;
|
|
1682
|
+
}
|
|
1683
|
+
const area = _geoJsonRingSignedArea(ring);
|
|
1684
|
+
const isExterior = i === 0;
|
|
1685
|
+
if (isExterior && area < 0) {
|
|
1686
|
+
warnings.push({ path: ringPath, message: "exterior ring winds clockwise; RFC 7946 recommends counterclockwise for exterior rings (right-hand rule)" });
|
|
1687
|
+
} else if (!isExterior && area > 0) {
|
|
1688
|
+
warnings.push({ path: ringPath, message: "interior ring (hole) winds counterclockwise; RFC 7946 recommends clockwise for interior rings (right-hand rule)" });
|
|
1689
|
+
}
|
|
1690
|
+
});
|
|
1691
|
+
}
|
|
1692
|
+
function _validateGeoJsonGeometry(geom, path, errors, warnings) {
|
|
1693
|
+
if (geom === null) return;
|
|
1694
|
+
if (typeof geom !== "object" || Array.isArray(geom)) {
|
|
1695
|
+
errors.push({ path, message: "geometry must be an object or null" });
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1698
|
+
const type = geom.type;
|
|
1699
|
+
if (typeof type !== "string" || !GEOJSON_GEOMETRY_TYPES.has(type)) {
|
|
1700
|
+
errors.push({ path: `${path}.type`, message: `geometry type must be one of ${[...GEOJSON_GEOMETRY_TYPES].join(", ")}` });
|
|
1701
|
+
return;
|
|
1702
|
+
}
|
|
1703
|
+
if (type === "GeometryCollection") {
|
|
1704
|
+
if (!Array.isArray(geom.geometries)) {
|
|
1705
|
+
errors.push({ path: `${path}.geometries`, message: 'GeometryCollection must have a "geometries" array' });
|
|
1706
|
+
return;
|
|
1707
|
+
}
|
|
1708
|
+
geom.geometries.forEach((g, i) => _validateGeoJsonGeometry(g, `${path}.geometries[${i}]`, errors, warnings));
|
|
1709
|
+
return;
|
|
1710
|
+
}
|
|
1711
|
+
const coords = geom.coordinates;
|
|
1712
|
+
const coordPath = `${path}.coordinates`;
|
|
1713
|
+
switch (type) {
|
|
1714
|
+
case "Point":
|
|
1715
|
+
if (!_isGeoJsonPosition(coords)) errors.push({ path: coordPath, message: "Point coordinates must be an array of 2 or 3 numbers" });
|
|
1716
|
+
break;
|
|
1717
|
+
case "MultiPoint":
|
|
1718
|
+
if (!Array.isArray(coords) || !coords.every(_isGeoJsonPosition)) {
|
|
1719
|
+
errors.push({ path: coordPath, message: "MultiPoint coordinates must be an array of positions" });
|
|
1720
|
+
}
|
|
1721
|
+
break;
|
|
1722
|
+
case "LineString":
|
|
1723
|
+
if (!Array.isArray(coords) || coords.length < 2 || !coords.every(_isGeoJsonPosition)) {
|
|
1724
|
+
errors.push({ path: coordPath, message: "LineString coordinates must be an array of at least 2 positions" });
|
|
1725
|
+
}
|
|
1726
|
+
break;
|
|
1727
|
+
case "MultiLineString":
|
|
1728
|
+
if (!Array.isArray(coords) || !coords.every((line) => Array.isArray(line) && line.length >= 2 && line.every(_isGeoJsonPosition))) {
|
|
1729
|
+
errors.push({ path: coordPath, message: "MultiLineString coordinates must be an array of LineString coordinate arrays" });
|
|
1730
|
+
}
|
|
1731
|
+
break;
|
|
1732
|
+
case "Polygon":
|
|
1733
|
+
_validateGeoJsonPolygonCoords(coords, coordPath, errors, warnings);
|
|
1734
|
+
break;
|
|
1735
|
+
case "MultiPolygon":
|
|
1736
|
+
if (!Array.isArray(coords)) {
|
|
1737
|
+
errors.push({ path: coordPath, message: "MultiPolygon coordinates must be an array of Polygon coordinate arrays" });
|
|
1738
|
+
} else {
|
|
1739
|
+
coords.forEach((poly, i) => _validateGeoJsonPolygonCoords(poly, `${coordPath}[${i}]`, errors, warnings));
|
|
1740
|
+
}
|
|
1741
|
+
break;
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
function _validateGeoJsonBbox(bbox, path, errors) {
|
|
1745
|
+
if (bbox === void 0) return;
|
|
1746
|
+
if (!Array.isArray(bbox) || bbox.length % 2 !== 0 || bbox.length < 4 || !bbox.every(_isGeoJsonNumber)) {
|
|
1747
|
+
errors.push({ path: `${path}.bbox`, message: "bbox must be an array of 2*n numbers (min/max per axis)" });
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
function _validateGeoJsonFeature(feature, path, errors, warnings) {
|
|
1751
|
+
if (typeof feature !== "object" || feature === null || Array.isArray(feature)) {
|
|
1752
|
+
errors.push({ path, message: "Feature must be an object" });
|
|
1753
|
+
return;
|
|
1754
|
+
}
|
|
1755
|
+
if (feature.type !== "Feature") {
|
|
1756
|
+
errors.push({ path: `${path}.type`, message: '"type" must be "Feature"' });
|
|
1757
|
+
}
|
|
1758
|
+
if (!("properties" in feature) || typeof feature.properties !== "object") {
|
|
1759
|
+
errors.push({ path: `${path}.properties`, message: '"properties" member is required and must be an object or null' });
|
|
1760
|
+
}
|
|
1761
|
+
if (!("geometry" in feature)) {
|
|
1762
|
+
errors.push({ path: `${path}.geometry`, message: '"geometry" member is required (an object or null)' });
|
|
1763
|
+
} else {
|
|
1764
|
+
_validateGeoJsonGeometry(feature.geometry, `${path}.geometry`, errors, warnings);
|
|
1765
|
+
}
|
|
1766
|
+
_validateGeoJsonBbox(feature.bbox, path, errors);
|
|
1767
|
+
}
|
|
1768
|
+
function validateGeoJson(input) {
|
|
1769
|
+
let doc;
|
|
1770
|
+
if (typeof input === "string") {
|
|
1771
|
+
try {
|
|
1772
|
+
doc = JSON.parse(input);
|
|
1773
|
+
} catch (e) {
|
|
1774
|
+
return { valid: false, type: null, errors: [{ path: "$", message: `invalid JSON: ${e.message}` }], warnings: [] };
|
|
1775
|
+
}
|
|
1776
|
+
} else {
|
|
1777
|
+
doc = input;
|
|
1778
|
+
}
|
|
1779
|
+
if (typeof doc !== "object" || doc === null || Array.isArray(doc)) {
|
|
1780
|
+
return { valid: false, type: null, errors: [{ path: "$", message: "document must be a JSON object" }], warnings: [] };
|
|
1781
|
+
}
|
|
1782
|
+
const type = doc.type;
|
|
1783
|
+
if (typeof type !== "string") {
|
|
1784
|
+
return { valid: false, type: null, errors: [{ path: "$.type", message: '"type" member is required' }], warnings: [] };
|
|
1785
|
+
}
|
|
1786
|
+
const errors = [];
|
|
1787
|
+
const warnings = [];
|
|
1788
|
+
_validateGeoJsonBbox(doc.bbox, "$", errors);
|
|
1789
|
+
if (type === "FeatureCollection") {
|
|
1790
|
+
if (!Array.isArray(doc.features)) {
|
|
1791
|
+
errors.push({ path: "$.features", message: 'FeatureCollection must have a "features" array' });
|
|
1792
|
+
} else {
|
|
1793
|
+
doc.features.forEach((feature, i) => _validateGeoJsonFeature(feature, `$.features[${i}]`, errors, warnings));
|
|
1794
|
+
}
|
|
1795
|
+
} else if (type === "Feature") {
|
|
1796
|
+
_validateGeoJsonFeature(doc, "$", errors, warnings);
|
|
1797
|
+
} else if (GEOJSON_GEOMETRY_TYPES.has(type)) {
|
|
1798
|
+
_validateGeoJsonGeometry(doc, "$", errors, warnings);
|
|
1799
|
+
} else {
|
|
1800
|
+
errors.push({ path: "$.type", message: '"type" must be one of Feature, FeatureCollection, or a geometry type' });
|
|
1801
|
+
}
|
|
1802
|
+
return { valid: errors.length === 0, type, errors, warnings };
|
|
1803
|
+
}
|
|
1639
1804
|
|
|
1640
1805
|
exports.applyJsonMergePatch = applyJsonMergePatch;
|
|
1641
1806
|
exports.applyJsonPatch = applyJsonPatch;
|
|
@@ -1666,6 +1831,7 @@ exports.parseStructs = parseStructs;
|
|
|
1666
1831
|
exports.resolveJsonPointer = resolveJsonPointer;
|
|
1667
1832
|
exports.toPascalCase = toPascalCase;
|
|
1668
1833
|
exports.toSnakeCase = toSnakeCase;
|
|
1834
|
+
exports.validateGeoJson = validateGeoJson;
|
|
1669
1835
|
exports.validateJson = validateJson;
|
|
1670
1836
|
exports.validateJsonPath = validateJsonPath;
|
|
1671
1837
|
exports.validateJsonString = validateJsonString;
|
package/dist/tools/json.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as ConvertOptions, a as CsvOptions, D as DiffNode, b as DiffType, G as
|
|
1
|
+
export { C as ConvertOptions, a as CsvOptions, D as DiffNode, b as DiffType, G as GeoJsonIssue, c as GeoJsonValidateResult, d as GoField, e as GoStruct, J as JsonDiffResult, f as JsonParseResult, g as JsonPatchOp, h as JsonPatchOperation, i as JsonPathResult, k as JsonPointerResult, l as JsonSchemaLike, m as JsonSchemaToTsOptions, M as MergePatchResult, P as ParseStatus, n as PythonClass, o as PythonField, p as PythonMode, V as ValidationError, q as ValidationResult, Z as ZodOptions, r as applyJsonMergePatch, s as applyJsonPatch, t as csvToJson, u as detectFormat, v as diffJson, w as diffJsonPatch, x as evaluateJsonPath, y as formatDiffLine, z as formatJson, A as generateExample, B as generateJsonPatch, E as getJsonStats, F as inferGoType, H as inferPythonType, I as inferType, K as jsonSchemaToTypescript, L as jsonToCsv, N as jsonToGo, O as jsonToPython, Q as jsonToTypescript, R as jsonToYaml, S as jsonToZod, T as mergeJsonPatch, U as minifyJson, W as parseJson, X as parseStructs, Y as resolveJsonPointer, _ as toPascalCase, $ as toSnakeCase, a0 as validateGeoJson, a1 as validateJson, a2 as validateJsonPath, a3 as validateJsonString, a4 as yamlToJson } from '../json-BtRszk1w.cjs';
|
package/dist/tools/json.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as ConvertOptions, a as CsvOptions, D as DiffNode, b as DiffType, G as
|
|
1
|
+
export { C as ConvertOptions, a as CsvOptions, D as DiffNode, b as DiffType, G as GeoJsonIssue, c as GeoJsonValidateResult, d as GoField, e as GoStruct, J as JsonDiffResult, f as JsonParseResult, g as JsonPatchOp, h as JsonPatchOperation, i as JsonPathResult, k as JsonPointerResult, l as JsonSchemaLike, m as JsonSchemaToTsOptions, M as MergePatchResult, P as ParseStatus, n as PythonClass, o as PythonField, p as PythonMode, V as ValidationError, q as ValidationResult, Z as ZodOptions, r as applyJsonMergePatch, s as applyJsonPatch, t as csvToJson, u as detectFormat, v as diffJson, w as diffJsonPatch, x as evaluateJsonPath, y as formatDiffLine, z as formatJson, A as generateExample, B as generateJsonPatch, E as getJsonStats, F as inferGoType, H as inferPythonType, I as inferType, K as jsonSchemaToTypescript, L as jsonToCsv, N as jsonToGo, O as jsonToPython, Q as jsonToTypescript, R as jsonToYaml, S as jsonToZod, T as mergeJsonPatch, U as minifyJson, W as parseJson, X as parseStructs, Y as resolveJsonPointer, _ as toPascalCase, $ as toSnakeCase, a0 as validateGeoJson, a1 as validateJson, a2 as validateJsonPath, a3 as validateJsonString, a4 as yamlToJson } from '../json-BtRszk1w.js';
|
package/dist/tools/json.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { applyJsonMergePatch, applyJsonPatch, csvToJson, detectFormat, diffJson, diffJsonPatch, evaluateJsonPath, formatDiffLine, formatJson, generateExample, generateJsonPatch, getJsonStats, inferGoType, inferPythonType, inferType, jsonSchemaToTypescript, jsonToCsv, jsonToGo, jsonToPython, jsonToTypescript, jsonToYaml, jsonToZod, mergeJsonPatch, minifyJson, parseJson, parseStructs, resolveJsonPointer, toPascalCase, toSnakeCase, validateJson, validateJsonPath, validateJsonString, yamlToJson } from '../chunk-
|
|
1
|
+
export { applyJsonMergePatch, applyJsonPatch, csvToJson, detectFormat, diffJson, diffJsonPatch, evaluateJsonPath, formatDiffLine, formatJson, generateExample, generateJsonPatch, getJsonStats, inferGoType, inferPythonType, inferType, jsonSchemaToTypescript, jsonToCsv, jsonToGo, jsonToPython, jsonToTypescript, jsonToYaml, jsonToZod, mergeJsonPatch, minifyJson, parseJson, parseStructs, resolveJsonPointer, toPascalCase, toSnakeCase, validateGeoJson, validateJson, validateJsonPath, validateJsonString, yamlToJson } from '../chunk-PAMHORKV.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -3184,6 +3184,119 @@ function calculatePositionSize(input) {
|
|
|
3184
3184
|
targetOnCorrectSide
|
|
3185
3185
|
};
|
|
3186
3186
|
}
|
|
3187
|
+
var TIMECODE_NOMINAL_FPS = {
|
|
3188
|
+
"23.976": 24,
|
|
3189
|
+
"24": 24,
|
|
3190
|
+
"25": 25,
|
|
3191
|
+
"29.97": 30,
|
|
3192
|
+
"30": 30,
|
|
3193
|
+
"50": 50,
|
|
3194
|
+
"59.94": 60,
|
|
3195
|
+
"60": 60
|
|
3196
|
+
};
|
|
3197
|
+
function _timecodeNominalFps(frameRate) {
|
|
3198
|
+
return TIMECODE_NOMINAL_FPS[String(frameRate)] ?? null;
|
|
3199
|
+
}
|
|
3200
|
+
function _timecodeIsDropFrameEligible(frameRate) {
|
|
3201
|
+
return frameRate === 29.97 || frameRate === 59.94;
|
|
3202
|
+
}
|
|
3203
|
+
function _framesToPlainTimecode(frameNumber, nominalFps) {
|
|
3204
|
+
const framesPerDay = nominalFps * 86400;
|
|
3205
|
+
const fn = (frameNumber % framesPerDay + framesPerDay) % framesPerDay;
|
|
3206
|
+
const frames = fn % nominalFps;
|
|
3207
|
+
const totalSeconds = Math.floor(fn / nominalFps);
|
|
3208
|
+
return {
|
|
3209
|
+
hours: Math.floor(totalSeconds / 3600) % 24,
|
|
3210
|
+
minutes: Math.floor(totalSeconds / 60) % 60,
|
|
3211
|
+
seconds: totalSeconds % 60,
|
|
3212
|
+
frames
|
|
3213
|
+
};
|
|
3214
|
+
}
|
|
3215
|
+
function _plainTimecodeToFrames(hh, mm, ss, ff, nominalFps) {
|
|
3216
|
+
return nominalFps * 3600 * hh + nominalFps * 60 * mm + nominalFps * ss + ff;
|
|
3217
|
+
}
|
|
3218
|
+
function _framesToDropFrameTimecode(frameNumber, nominalFps, frameRate) {
|
|
3219
|
+
const dropFrames = nominalFps === 30 ? 2 : 4;
|
|
3220
|
+
const framesPer24Hours = Math.round(frameRate * 86400);
|
|
3221
|
+
const framesPer10Minutes = Math.round(frameRate * 600);
|
|
3222
|
+
const framesPerMinute = nominalFps * 60 - dropFrames;
|
|
3223
|
+
const fn = (frameNumber % framesPer24Hours + framesPer24Hours) % framesPer24Hours;
|
|
3224
|
+
const d = Math.floor(fn / framesPer10Minutes);
|
|
3225
|
+
const m = fn % framesPer10Minutes;
|
|
3226
|
+
let frameNumberOut = fn + 9 * dropFrames * d;
|
|
3227
|
+
if (m > dropFrames) {
|
|
3228
|
+
frameNumberOut += dropFrames * Math.floor((m - dropFrames) / framesPerMinute);
|
|
3229
|
+
}
|
|
3230
|
+
const frames = frameNumberOut % nominalFps;
|
|
3231
|
+
const totalSeconds = Math.floor(frameNumberOut / nominalFps);
|
|
3232
|
+
return {
|
|
3233
|
+
hours: Math.floor(totalSeconds / 3600) % 24,
|
|
3234
|
+
minutes: Math.floor(totalSeconds / 60) % 60,
|
|
3235
|
+
seconds: totalSeconds % 60,
|
|
3236
|
+
frames
|
|
3237
|
+
};
|
|
3238
|
+
}
|
|
3239
|
+
function _dropFrameTimecodeToFrames(hh, mm, ss, ff, nominalFps) {
|
|
3240
|
+
const dropFrames = nominalFps === 30 ? 2 : 4;
|
|
3241
|
+
const totalMinutes = 60 * hh + mm;
|
|
3242
|
+
return nominalFps * 3600 * hh + nominalFps * 60 * mm + nominalFps * ss + ff - dropFrames * (totalMinutes - Math.floor(totalMinutes / 10));
|
|
3243
|
+
}
|
|
3244
|
+
function _formatTimecode(parts, dropFrame) {
|
|
3245
|
+
const p2 = (n) => String(n).padStart(2, "0");
|
|
3246
|
+
const sep = dropFrame ? ";" : ":";
|
|
3247
|
+
return `${p2(parts.hours)}:${p2(parts.minutes)}:${p2(parts.seconds)}${sep}${p2(parts.frames)}`;
|
|
3248
|
+
}
|
|
3249
|
+
function convertTimecode(input) {
|
|
3250
|
+
const { mode, frameRate } = input;
|
|
3251
|
+
const dropFrame = input.dropFrame ?? false;
|
|
3252
|
+
const nominalFps = _timecodeNominalFps(frameRate);
|
|
3253
|
+
if (nominalFps === null) {
|
|
3254
|
+
return { error: "frameRate must be one of 23.976, 24, 25, 29.97, 30, 50, 59.94, 60" };
|
|
3255
|
+
}
|
|
3256
|
+
if (dropFrame && !_timecodeIsDropFrameEligible(frameRate)) {
|
|
3257
|
+
return { error: "dropFrame is only valid for frameRate 29.97 or 59.94" };
|
|
3258
|
+
}
|
|
3259
|
+
if (mode === "frames-to-timecode") {
|
|
3260
|
+
const { frameCount } = input;
|
|
3261
|
+
if (typeof frameCount !== "number" || !Number.isFinite(frameCount) || frameCount < 0 || Math.floor(frameCount) !== frameCount) {
|
|
3262
|
+
return { error: 'frameCount must be a non-negative integer for mode "frames-to-timecode"' };
|
|
3263
|
+
}
|
|
3264
|
+
const parts = dropFrame ? _framesToDropFrameTimecode(frameCount, nominalFps, frameRate) : _framesToPlainTimecode(frameCount, nominalFps);
|
|
3265
|
+
return {
|
|
3266
|
+
mode,
|
|
3267
|
+
frameRate,
|
|
3268
|
+
dropFrame,
|
|
3269
|
+
frameCount,
|
|
3270
|
+
timecode: _formatTimecode(parts, dropFrame),
|
|
3271
|
+
seconds: Math.round(frameCount / frameRate * 1e6) / 1e6
|
|
3272
|
+
};
|
|
3273
|
+
}
|
|
3274
|
+
if (mode === "timecode-to-frames") {
|
|
3275
|
+
const { timecode } = input;
|
|
3276
|
+
if (typeof timecode !== "string") return { error: 'timecode must be a string for mode "timecode-to-frames"' };
|
|
3277
|
+
const match = /^(\d{2}):(\d{2}):(\d{2})[:;](\d{2})$/.exec(timecode.trim());
|
|
3278
|
+
if (!match) return { error: "timecode must be in the form HH:MM:SS:FF (or HH:MM:SS;FF)" };
|
|
3279
|
+
const [, hhS, mmS, ssS, ffS] = match;
|
|
3280
|
+
const hh = Number(hhS), mm = Number(mmS), ss = Number(ssS), ff = Number(ffS);
|
|
3281
|
+
if (hh > 23) return { error: "hours must be 00-23" };
|
|
3282
|
+
if (mm > 59) return { error: "minutes must be 00-59" };
|
|
3283
|
+
if (ss > 59) return { error: "seconds must be 00-59" };
|
|
3284
|
+
if (ff >= nominalFps) return { error: `frames must be 00-${nominalFps - 1} at this frame rate` };
|
|
3285
|
+
if (dropFrame && ff <= 1 && ss === 0 && mm % 10 !== 0) {
|
|
3286
|
+
return { error: `frame ${ffS} at ${hhS}:${mmS}:${ssS} does not exist in drop-frame timecode: frames 00 and 01 are dropped at the start of every minute except every 10th minute` };
|
|
3287
|
+
}
|
|
3288
|
+
const frameCount = dropFrame ? _dropFrameTimecodeToFrames(hh, mm, ss, ff, nominalFps) : _plainTimecodeToFrames(hh, mm, ss, ff, nominalFps);
|
|
3289
|
+
return {
|
|
3290
|
+
mode,
|
|
3291
|
+
frameRate,
|
|
3292
|
+
dropFrame,
|
|
3293
|
+
frameCount,
|
|
3294
|
+
timecode: _formatTimecode({ hours: hh, minutes: mm, seconds: ss, frames: ff }, dropFrame),
|
|
3295
|
+
seconds: Math.round(frameCount / frameRate * 1e6) / 1e6
|
|
3296
|
+
};
|
|
3297
|
+
}
|
|
3298
|
+
return { error: 'mode must be "frames-to-timecode" or "timecode-to-frames"' };
|
|
3299
|
+
}
|
|
3187
3300
|
|
|
3188
3301
|
exports.BASE_LABELS = BASE_LABELS;
|
|
3189
3302
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -3248,6 +3361,7 @@ exports.convert = convert;
|
|
|
3248
3361
|
exports.convertAprApy = convertAprApy;
|
|
3249
3362
|
exports.convertBytes = convertBytes;
|
|
3250
3363
|
exports.convertIp = convertIp;
|
|
3364
|
+
exports.convertTimecode = convertTimecode;
|
|
3251
3365
|
exports.coverBox = coverBox;
|
|
3252
3366
|
exports.decimalToIp = decimalToIp;
|
|
3253
3367
|
exports.decimalToIpCidr = decimalToIpCidr;
|
package/dist/tools/units.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AbaFederalReserveDistrict, a as AbaRoutingNumberResult, b as AbaRoutingNumberType, c as AmortizationRow, d as AnnuityPayoutInput, e as AnnuityPayoutMode, f as AnnuityPayoutResult, g as AnnuityStructure, h as AprApyDirection, i as AprApyResult, j as AspectRatioResult, k as AudioFileSizeInput, l as AudioFileSizeMode, m as AudioFileSizeResult, B as BASE_LABELS, n as BASE_PREFIXES, o as BYTE_UNITS, p as BarcodeFormat, q as BarcodeValidationResult, r as BaseConvertResult, s as BlendedLoanRateResult, t as BreakEvenInput, v as BreakEvenResult, w as ByteConvertResult, x as ByteUnit, C as COMMON_CURRENCIES, y as COMMON_LOCALES, z as COMMON_PERMISSIONS, D as COMMON_RATIOS, E as COMMON_SIZES, F as COMMON_TAX_RATES, G as COMMON_TIP_PERCENTAGES, H as COMMON_VIEWPORTS, I as CardValidationResult, J as CashBreakdownResult, K as CashChangeResult, L as CashDenominationItem, M as CashRoundingMode, N as CashRoundingResult, O as CdMaturityResult, P as CommissionBreakdownEntry, Q as CommissionInput, R as CommissionResult, S as CommissionTier, T as CompareUnitPricesResult, U as CompoundInterestResult, V as CompoundYearRow, W as CreditAccountInput, X as CreditAccountResult, Y as CreditCardMinimumPaymentResult, Z as CreditUtilizationResult, _ as DebtItemInput, $ as DebtItemResult, a0 as DebtPayoffComparison, a1 as DebtPayoffInput, a2 as DebtPayoffPlanResult, a3 as DebtPayoffScheduleEntry, a4 as DebtPayoffStrategy, a5 as DebtPayoffStrategyResult, a6 as DebtToIncomeRatioResult, a7 as DepreciationMethod, a8 as DepreciationResult, a9 as DepreciationYear, aa as Dimensions, ab as DiscountField, ac as DiscountInput, ad as DiscountResult, ae as DtiTier, af as EmiResult, ag as EmiTenureUnit, ah as EmiYearlyBreakdownRow, ai as ExtraPaymentPayoffResult, aj as FilePermissions, ak as FileSizeUnit, al as FormatOptions, am as FreelancerRateInput, an as FreelancerRateResult, ao as GPA_GRADE_POINTS, ap as GpaCourse, aq as GpaCourseResult, ar as GpaResult, as as IbanValidationResult, at as IpConversion, au as IsbnFormat, av as IsbnResult, aw as IsinValidationResult, ax as LoanBalanceInput, ay as LoanBalanceResult, az as LoanPrepaymentPenaltyResult, aA as LoanRefinanceResult, aB as LoanResult, aC as MarginMarkupField, aD as MarginMarkupInput, aE as MarginMarkupResult, aF as MortgagePointsResult, aG as MovingAveragePoint, aH as MovingAverageResult, aI as NegativeAmortizationInput, aJ as NegativeAmortizationMonth, aK as NegativeAmortizationResult, aL as NotationStyle, aM as NumberBase, aN as PaybackPeriodInput, aO as PaybackPeriodResult, aP as PercentChangeDirection, aQ as PercentageChangeResult, aR as Permission, aS as PositionSizeInput, aT as PositionSizeResult, aU as PrepaymentPenaltyType, aV as PxConvertResult, aW as RangeIntersectionResult, aX as RealRateField, aY as RealRateOfReturnInput, aZ as RealRateOfReturnResult, a_ as RequiredBandwidthResult, a$ as RoiInput, b0 as RoiResult, b1 as RuleOf72Direction, b2 as RuleOf72Result, b3 as SavingsGoalInput, b4 as SavingsGoalMode, b5 as SavingsGoalResult, b6 as SemverVersion, b7 as SimpleInterestResult, b8 as SubnetInfo, b9 as SuccessiveDiscountResult, ba as SuccessiveDiscountStep, bb as TaxDirection, bc as TaxEquivalentYieldDirection, bd as TaxEquivalentYieldResult, be as TaxResult, bf as TimeValueDirection, bg as TimeValueResult, bh as
|
|
1
|
+
export { A as AbaFederalReserveDistrict, a as AbaRoutingNumberResult, b as AbaRoutingNumberType, c as AmortizationRow, d as AnnuityPayoutInput, e as AnnuityPayoutMode, f as AnnuityPayoutResult, g as AnnuityStructure, h as AprApyDirection, i as AprApyResult, j as AspectRatioResult, k as AudioFileSizeInput, l as AudioFileSizeMode, m as AudioFileSizeResult, B as BASE_LABELS, n as BASE_PREFIXES, o as BYTE_UNITS, p as BarcodeFormat, q as BarcodeValidationResult, r as BaseConvertResult, s as BlendedLoanRateResult, t as BreakEvenInput, v as BreakEvenResult, w as ByteConvertResult, x as ByteUnit, C as COMMON_CURRENCIES, y as COMMON_LOCALES, z as COMMON_PERMISSIONS, D as COMMON_RATIOS, E as COMMON_SIZES, F as COMMON_TAX_RATES, G as COMMON_TIP_PERCENTAGES, H as COMMON_VIEWPORTS, I as CardValidationResult, J as CashBreakdownResult, K as CashChangeResult, L as CashDenominationItem, M as CashRoundingMode, N as CashRoundingResult, O as CdMaturityResult, P as CommissionBreakdownEntry, Q as CommissionInput, R as CommissionResult, S as CommissionTier, T as CompareUnitPricesResult, U as CompoundInterestResult, V as CompoundYearRow, W as CreditAccountInput, X as CreditAccountResult, Y as CreditCardMinimumPaymentResult, Z as CreditUtilizationResult, _ as DebtItemInput, $ as DebtItemResult, a0 as DebtPayoffComparison, a1 as DebtPayoffInput, a2 as DebtPayoffPlanResult, a3 as DebtPayoffScheduleEntry, a4 as DebtPayoffStrategy, a5 as DebtPayoffStrategyResult, a6 as DebtToIncomeRatioResult, a7 as DepreciationMethod, a8 as DepreciationResult, a9 as DepreciationYear, aa as Dimensions, ab as DiscountField, ac as DiscountInput, ad as DiscountResult, ae as DtiTier, af as EmiResult, ag as EmiTenureUnit, ah as EmiYearlyBreakdownRow, ai as ExtraPaymentPayoffResult, aj as FilePermissions, ak as FileSizeUnit, al as FormatOptions, am as FreelancerRateInput, an as FreelancerRateResult, ao as GPA_GRADE_POINTS, ap as GpaCourse, aq as GpaCourseResult, ar as GpaResult, as as IbanValidationResult, at as IpConversion, au as IsbnFormat, av as IsbnResult, aw as IsinValidationResult, ax as LoanBalanceInput, ay as LoanBalanceResult, az as LoanPrepaymentPenaltyResult, aA as LoanRefinanceResult, aB as LoanResult, aC as MarginMarkupField, aD as MarginMarkupInput, aE as MarginMarkupResult, aF as MortgagePointsResult, aG as MovingAveragePoint, aH as MovingAverageResult, aI as NegativeAmortizationInput, aJ as NegativeAmortizationMonth, aK as NegativeAmortizationResult, aL as NotationStyle, aM as NumberBase, aN as PaybackPeriodInput, aO as PaybackPeriodResult, aP as PercentChangeDirection, aQ as PercentageChangeResult, aR as Permission, aS as PositionSizeInput, aT as PositionSizeResult, aU as PrepaymentPenaltyType, aV as PxConvertResult, aW as RangeIntersectionResult, aX as RealRateField, aY as RealRateOfReturnInput, aZ as RealRateOfReturnResult, a_ as RequiredBandwidthResult, a$ as RoiInput, b0 as RoiResult, b1 as RuleOf72Direction, b2 as RuleOf72Result, b3 as SavingsGoalInput, b4 as SavingsGoalMode, b5 as SavingsGoalResult, b6 as SemverVersion, b7 as SimpleInterestResult, b8 as SubnetInfo, b9 as SuccessiveDiscountResult, ba as SuccessiveDiscountStep, bb as TaxDirection, bc as TaxEquivalentYieldDirection, bd as TaxEquivalentYieldResult, be as TaxResult, bf as TimeValueDirection, bg as TimeValueResult, bh as TimecodeConvertInput, bi as TimecodeConvertResult, bj as TimecodeMode, bk as TipSplitResult, bl as TransferSpeedUnit, bm as TransferTimeResult, bn as USD_DENOMINATIONS, bo as UnitPriceItem, bp as UnitPriceResult, bq as UtilizationTier, br as VideoBitrateInput, bs as VideoBitrateMode, bt as VideoBitrateResult, bu as ViewportConvertResult, bv as VinValidationResult, bw as applySuccessiveDiscounts, bx as autoFormat, by as bumpVersion, bz as calcAspectRatio, bA as calcSubnet, bB as calculateAnnuityPayout, bC as calculateBlendedLoanRate, bD as calculateBreakEven, bE as calculateCashBreakdown, bF as calculateCashRounding, bG as calculateCdMaturity, bH as calculateChange, bI as calculateCompoundInterest, bJ as calculateCreditCardMinimumPayment, bK as calculateCreditUtilization, bL as calculateDebtToIncomeRatio, bM as calculateDepreciationSchedule, bN as calculateDiscount, bO as calculateEmi, bP as calculateExtraPaymentPayoff, bQ as calculateFreelancerRate, bR as calculateGpa, bS as calculateLoan, bT as calculateLoanPrepaymentPenalty, bU as calculateLoanRefinance, bV as calculateMarginMarkup, bW as calculateMortgagePoints, bX as calculateMovingAverages, bY as calculatePaybackPeriod, bZ as calculatePercentageChange, b_ as calculatePositionSize, b$ as calculateRealRateOfReturn, c0 as calculateRequiredBandwidth, c1 as calculateRoi, c2 as calculateRuleOf72, c3 as calculateSalesCommission, c4 as calculateSavingsGoal, c5 as calculateSimpleInterest, c6 as calculateTax, c7 as calculateTaxEquivalentYield, c8 as calculateTimeValue, c9 as calculateTipSplit, ca as calculateTransferTime, cb as calculateVideoBitrate, cc as compareSemver, cd as compareUnitPrices, ce as convert, cf as convertAprApy, cg as convertBytes, ch as convertIp, ci as convertTimecode, cj as coverBox, ck as decimalToIp, cl as decimalToIpCidr, cm as describePermissions, cn as detectNegativeAmortization, co as estimateAudioFileSize, cp as fitIntoBox, cq as formatNumber, cr as formatValue, cs as formatVwValue, ct as formatWithSeparator, cu as gcd, cv as intersectSemverRanges, cw as ipFromBinary, cx as ipFromDecimal, cy as ipFromHex, cz as ipToBinary, cA as ipToDecimal, cB as ipToDecimalCidr, cC as ipToHex, cD as ipToOctal, cE as isValid, cF as isValidCidr, cG as isValidIp, cH as isValidIpv4, cI as marginToMarkup, cJ as markupToMargin, cK as octalToPermissions, cL as parseFileSize, cM as parseInput, cN as parseNumberString, cO as parseSemver, cP as permissionsToChmod, cQ as permissionsToOctal, cR as permissionsToSymbolic, cS as planDebtPayoff, cT as ptToPx, cU as pxToAll, cV as pxToViewport, cW as remToPx, cX as satisfiesRange, cY as scaleByHeight, cZ as scaleByWidth, c_ as sortVersions, c$ as splitSubnet, d0 as symbolicToPermissions, d1 as validateBarcode, d2 as validateCardNumber, d3 as validateIban, d4 as validateIsbn, d5 as validateIsin, d6 as validateRoutingNumber, d7 as validateVin, d8 as viewportToPx } from '../units-CGTx1S6B.cjs';
|
package/dist/tools/units.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AbaFederalReserveDistrict, a as AbaRoutingNumberResult, b as AbaRoutingNumberType, c as AmortizationRow, d as AnnuityPayoutInput, e as AnnuityPayoutMode, f as AnnuityPayoutResult, g as AnnuityStructure, h as AprApyDirection, i as AprApyResult, j as AspectRatioResult, k as AudioFileSizeInput, l as AudioFileSizeMode, m as AudioFileSizeResult, B as BASE_LABELS, n as BASE_PREFIXES, o as BYTE_UNITS, p as BarcodeFormat, q as BarcodeValidationResult, r as BaseConvertResult, s as BlendedLoanRateResult, t as BreakEvenInput, v as BreakEvenResult, w as ByteConvertResult, x as ByteUnit, C as COMMON_CURRENCIES, y as COMMON_LOCALES, z as COMMON_PERMISSIONS, D as COMMON_RATIOS, E as COMMON_SIZES, F as COMMON_TAX_RATES, G as COMMON_TIP_PERCENTAGES, H as COMMON_VIEWPORTS, I as CardValidationResult, J as CashBreakdownResult, K as CashChangeResult, L as CashDenominationItem, M as CashRoundingMode, N as CashRoundingResult, O as CdMaturityResult, P as CommissionBreakdownEntry, Q as CommissionInput, R as CommissionResult, S as CommissionTier, T as CompareUnitPricesResult, U as CompoundInterestResult, V as CompoundYearRow, W as CreditAccountInput, X as CreditAccountResult, Y as CreditCardMinimumPaymentResult, Z as CreditUtilizationResult, _ as DebtItemInput, $ as DebtItemResult, a0 as DebtPayoffComparison, a1 as DebtPayoffInput, a2 as DebtPayoffPlanResult, a3 as DebtPayoffScheduleEntry, a4 as DebtPayoffStrategy, a5 as DebtPayoffStrategyResult, a6 as DebtToIncomeRatioResult, a7 as DepreciationMethod, a8 as DepreciationResult, a9 as DepreciationYear, aa as Dimensions, ab as DiscountField, ac as DiscountInput, ad as DiscountResult, ae as DtiTier, af as EmiResult, ag as EmiTenureUnit, ah as EmiYearlyBreakdownRow, ai as ExtraPaymentPayoffResult, aj as FilePermissions, ak as FileSizeUnit, al as FormatOptions, am as FreelancerRateInput, an as FreelancerRateResult, ao as GPA_GRADE_POINTS, ap as GpaCourse, aq as GpaCourseResult, ar as GpaResult, as as IbanValidationResult, at as IpConversion, au as IsbnFormat, av as IsbnResult, aw as IsinValidationResult, ax as LoanBalanceInput, ay as LoanBalanceResult, az as LoanPrepaymentPenaltyResult, aA as LoanRefinanceResult, aB as LoanResult, aC as MarginMarkupField, aD as MarginMarkupInput, aE as MarginMarkupResult, aF as MortgagePointsResult, aG as MovingAveragePoint, aH as MovingAverageResult, aI as NegativeAmortizationInput, aJ as NegativeAmortizationMonth, aK as NegativeAmortizationResult, aL as NotationStyle, aM as NumberBase, aN as PaybackPeriodInput, aO as PaybackPeriodResult, aP as PercentChangeDirection, aQ as PercentageChangeResult, aR as Permission, aS as PositionSizeInput, aT as PositionSizeResult, aU as PrepaymentPenaltyType, aV as PxConvertResult, aW as RangeIntersectionResult, aX as RealRateField, aY as RealRateOfReturnInput, aZ as RealRateOfReturnResult, a_ as RequiredBandwidthResult, a$ as RoiInput, b0 as RoiResult, b1 as RuleOf72Direction, b2 as RuleOf72Result, b3 as SavingsGoalInput, b4 as SavingsGoalMode, b5 as SavingsGoalResult, b6 as SemverVersion, b7 as SimpleInterestResult, b8 as SubnetInfo, b9 as SuccessiveDiscountResult, ba as SuccessiveDiscountStep, bb as TaxDirection, bc as TaxEquivalentYieldDirection, bd as TaxEquivalentYieldResult, be as TaxResult, bf as TimeValueDirection, bg as TimeValueResult, bh as
|
|
1
|
+
export { A as AbaFederalReserveDistrict, a as AbaRoutingNumberResult, b as AbaRoutingNumberType, c as AmortizationRow, d as AnnuityPayoutInput, e as AnnuityPayoutMode, f as AnnuityPayoutResult, g as AnnuityStructure, h as AprApyDirection, i as AprApyResult, j as AspectRatioResult, k as AudioFileSizeInput, l as AudioFileSizeMode, m as AudioFileSizeResult, B as BASE_LABELS, n as BASE_PREFIXES, o as BYTE_UNITS, p as BarcodeFormat, q as BarcodeValidationResult, r as BaseConvertResult, s as BlendedLoanRateResult, t as BreakEvenInput, v as BreakEvenResult, w as ByteConvertResult, x as ByteUnit, C as COMMON_CURRENCIES, y as COMMON_LOCALES, z as COMMON_PERMISSIONS, D as COMMON_RATIOS, E as COMMON_SIZES, F as COMMON_TAX_RATES, G as COMMON_TIP_PERCENTAGES, H as COMMON_VIEWPORTS, I as CardValidationResult, J as CashBreakdownResult, K as CashChangeResult, L as CashDenominationItem, M as CashRoundingMode, N as CashRoundingResult, O as CdMaturityResult, P as CommissionBreakdownEntry, Q as CommissionInput, R as CommissionResult, S as CommissionTier, T as CompareUnitPricesResult, U as CompoundInterestResult, V as CompoundYearRow, W as CreditAccountInput, X as CreditAccountResult, Y as CreditCardMinimumPaymentResult, Z as CreditUtilizationResult, _ as DebtItemInput, $ as DebtItemResult, a0 as DebtPayoffComparison, a1 as DebtPayoffInput, a2 as DebtPayoffPlanResult, a3 as DebtPayoffScheduleEntry, a4 as DebtPayoffStrategy, a5 as DebtPayoffStrategyResult, a6 as DebtToIncomeRatioResult, a7 as DepreciationMethod, a8 as DepreciationResult, a9 as DepreciationYear, aa as Dimensions, ab as DiscountField, ac as DiscountInput, ad as DiscountResult, ae as DtiTier, af as EmiResult, ag as EmiTenureUnit, ah as EmiYearlyBreakdownRow, ai as ExtraPaymentPayoffResult, aj as FilePermissions, ak as FileSizeUnit, al as FormatOptions, am as FreelancerRateInput, an as FreelancerRateResult, ao as GPA_GRADE_POINTS, ap as GpaCourse, aq as GpaCourseResult, ar as GpaResult, as as IbanValidationResult, at as IpConversion, au as IsbnFormat, av as IsbnResult, aw as IsinValidationResult, ax as LoanBalanceInput, ay as LoanBalanceResult, az as LoanPrepaymentPenaltyResult, aA as LoanRefinanceResult, aB as LoanResult, aC as MarginMarkupField, aD as MarginMarkupInput, aE as MarginMarkupResult, aF as MortgagePointsResult, aG as MovingAveragePoint, aH as MovingAverageResult, aI as NegativeAmortizationInput, aJ as NegativeAmortizationMonth, aK as NegativeAmortizationResult, aL as NotationStyle, aM as NumberBase, aN as PaybackPeriodInput, aO as PaybackPeriodResult, aP as PercentChangeDirection, aQ as PercentageChangeResult, aR as Permission, aS as PositionSizeInput, aT as PositionSizeResult, aU as PrepaymentPenaltyType, aV as PxConvertResult, aW as RangeIntersectionResult, aX as RealRateField, aY as RealRateOfReturnInput, aZ as RealRateOfReturnResult, a_ as RequiredBandwidthResult, a$ as RoiInput, b0 as RoiResult, b1 as RuleOf72Direction, b2 as RuleOf72Result, b3 as SavingsGoalInput, b4 as SavingsGoalMode, b5 as SavingsGoalResult, b6 as SemverVersion, b7 as SimpleInterestResult, b8 as SubnetInfo, b9 as SuccessiveDiscountResult, ba as SuccessiveDiscountStep, bb as TaxDirection, bc as TaxEquivalentYieldDirection, bd as TaxEquivalentYieldResult, be as TaxResult, bf as TimeValueDirection, bg as TimeValueResult, bh as TimecodeConvertInput, bi as TimecodeConvertResult, bj as TimecodeMode, bk as TipSplitResult, bl as TransferSpeedUnit, bm as TransferTimeResult, bn as USD_DENOMINATIONS, bo as UnitPriceItem, bp as UnitPriceResult, bq as UtilizationTier, br as VideoBitrateInput, bs as VideoBitrateMode, bt as VideoBitrateResult, bu as ViewportConvertResult, bv as VinValidationResult, bw as applySuccessiveDiscounts, bx as autoFormat, by as bumpVersion, bz as calcAspectRatio, bA as calcSubnet, bB as calculateAnnuityPayout, bC as calculateBlendedLoanRate, bD as calculateBreakEven, bE as calculateCashBreakdown, bF as calculateCashRounding, bG as calculateCdMaturity, bH as calculateChange, bI as calculateCompoundInterest, bJ as calculateCreditCardMinimumPayment, bK as calculateCreditUtilization, bL as calculateDebtToIncomeRatio, bM as calculateDepreciationSchedule, bN as calculateDiscount, bO as calculateEmi, bP as calculateExtraPaymentPayoff, bQ as calculateFreelancerRate, bR as calculateGpa, bS as calculateLoan, bT as calculateLoanPrepaymentPenalty, bU as calculateLoanRefinance, bV as calculateMarginMarkup, bW as calculateMortgagePoints, bX as calculateMovingAverages, bY as calculatePaybackPeriod, bZ as calculatePercentageChange, b_ as calculatePositionSize, b$ as calculateRealRateOfReturn, c0 as calculateRequiredBandwidth, c1 as calculateRoi, c2 as calculateRuleOf72, c3 as calculateSalesCommission, c4 as calculateSavingsGoal, c5 as calculateSimpleInterest, c6 as calculateTax, c7 as calculateTaxEquivalentYield, c8 as calculateTimeValue, c9 as calculateTipSplit, ca as calculateTransferTime, cb as calculateVideoBitrate, cc as compareSemver, cd as compareUnitPrices, ce as convert, cf as convertAprApy, cg as convertBytes, ch as convertIp, ci as convertTimecode, cj as coverBox, ck as decimalToIp, cl as decimalToIpCidr, cm as describePermissions, cn as detectNegativeAmortization, co as estimateAudioFileSize, cp as fitIntoBox, cq as formatNumber, cr as formatValue, cs as formatVwValue, ct as formatWithSeparator, cu as gcd, cv as intersectSemverRanges, cw as ipFromBinary, cx as ipFromDecimal, cy as ipFromHex, cz as ipToBinary, cA as ipToDecimal, cB as ipToDecimalCidr, cC as ipToHex, cD as ipToOctal, cE as isValid, cF as isValidCidr, cG as isValidIp, cH as isValidIpv4, cI as marginToMarkup, cJ as markupToMargin, cK as octalToPermissions, cL as parseFileSize, cM as parseInput, cN as parseNumberString, cO as parseSemver, cP as permissionsToChmod, cQ as permissionsToOctal, cR as permissionsToSymbolic, cS as planDebtPayoff, cT as ptToPx, cU as pxToAll, cV as pxToViewport, cW as remToPx, cX as satisfiesRange, cY as scaleByHeight, cZ as scaleByWidth, c_ as sortVersions, c$ as splitSubnet, d0 as symbolicToPermissions, d1 as validateBarcode, d2 as validateCardNumber, d3 as validateIban, d4 as validateIsbn, d5 as validateIsin, d6 as validateRoutingNumber, d7 as validateVin, d8 as viewportToPx } from '../units-CGTx1S6B.js';
|
package/dist/tools/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateAnnuityPayout, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditCardMinimumPayment, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculatePositionSize, calculateRealRateOfReturn, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSalesCommission, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, detectNegativeAmortization, estimateAudioFileSize, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, intersectSemverRanges, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateRoutingNumber, validateVin, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateAnnuityPayout, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditCardMinimumPayment, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculatePositionSize, calculateRealRateOfReturn, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSalesCommission, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, convertTimecode, coverBox, decimalToIp, decimalToIpCidr, describePermissions, detectNegativeAmortization, estimateAudioFileSize, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, intersectSemverRanges, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateRoutingNumber, validateVin, viewportToPx } from '../chunk-X7IZ2OXW.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|