@guillaume-docquier/tools-ts 8.6.1 → 9.1.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/README.md CHANGED
@@ -35,6 +35,15 @@ external APIs, CLI input, local storage, or other unknown data.
35
35
  | `getEnumKey` | Looks up the enum key associated with a value. | You have an enum value and need the more descriptive key for display, logs, or diagnostics. |
36
36
  | `asArray` | Normalizes a single value or array into an array. | An API accepts both `T` and `T[]`, but downstream logic should iterate uniformly. |
37
37
 
38
+ ### Zod Parsing
39
+
40
+ Use these tools when constructing a value from trusted, typed data through a Zod schema. Install Zod in the consuming project to use them.
41
+
42
+ | Export | What it is | Use it when |
43
+ | -------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
44
+ | typedParse | Parses a typed, deeply unbranded value with a Zod schema and returns its output. | Invalid data is an internal invariant violation that should throw. |
45
+ | safeTypedParse | The non-throwing counterpart, returning a Zod safe parse result. | Validation may fail and the caller will handle the result. |
46
+
38
47
  ### Numeric Utilities
39
48
 
40
49
  Use these tools when code needs reusable numeric operations or validated
@@ -49,9 +58,10 @@ intervals.
49
58
 
50
59
  Use this tool when code needs shared ordering helpers.
51
60
 
52
- | Export | What it is | Use it when |
53
- | ------ | ---------------------------------------------- | --------------------------------------------------------------------------------------- |
54
- | `Sort` | Comparator helpers for common sort operations. | You want a shared sorting utility instead of rewriting compare callbacks at call sites. |
61
+ | Export | What it is | Use it when |
62
+ | ------------ | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
63
+ | `Sort` | Direction-aware numeric and property comparators, plus comparator composition. | You want a shared sorting utility instead of rewriting compare callbacks at call sites. |
64
+ | `Comparator` | Helper type to define comparators compatible with the Sort utilities. | You define sorting comparators. |
55
65
 
56
66
  ### Randomness
57
67
 
package/dist/Sort.d.ts CHANGED
@@ -1,18 +1,29 @@
1
- export declare const Sort: {
1
+ declare enum SortDirection {
2
+ /**
3
+ * From smallest to biggest.
4
+ */
5
+ Ascending = "Ascending",
2
6
  /**
3
- * Sorts numbers by ascending values
7
+ * From biggest to smallest.
4
8
  */
5
- byAscending: (a: number, b: number) => number;
9
+ Descending = "Descending"
10
+ }
11
+ export type Comparator<T> = (first: T, second: T) => number;
12
+ export declare const Sort: {
13
+ Direction: typeof SortDirection;
6
14
  /**
7
- * Sorts records by a numeric property in ascending order
15
+ * Composes comparators.
8
16
  */
9
- byAscendingProperty: <TProperty extends PropertyKey>(property: TProperty) => <TRecord extends Record<TProperty, number>>(a: TRecord, b: TRecord) => number;
17
+ compose: <T>(...comparators: ReadonlyArray<Comparator<T>>) => Comparator<T>;
10
18
  /**
11
- * Sorts numbers by ascending values
19
+ * Compares numbers in the selected direction.
20
+ * Defaults to Ascending.
12
21
  */
13
- byDescending: (a: number, b: number) => number;
22
+ numeric: (direction?: SortDirection) => Comparator<number>;
14
23
  /**
15
- * Sorts records by a numeric property in descending order
24
+ * Compares records by a numeric property in the selected direction.
25
+ * Defaults to Ascending.
16
26
  */
17
- byDescendingProperty: <TProperty extends PropertyKey>(property: TProperty) => <TRecord extends Record<TProperty, number>>(a: TRecord, b: TRecord) => number;
27
+ byNumericProperty: <TProperty extends PropertyKey>(property: TProperty, direction?: SortDirection) => <TRecord extends Record<TProperty, number>>(first: TRecord, second: TRecord) => number;
18
28
  };
29
+ export {};
package/dist/Sort.js CHANGED
@@ -1,27 +1,49 @@
1
- export const Sort = {
1
+ var SortDirection;
2
+ (function (SortDirection) {
2
3
  /**
3
- * Sorts numbers by ascending values
4
+ * From smallest to biggest.
4
5
  */
5
- byAscending: (a, b) => {
6
- return a - b;
7
- },
6
+ SortDirection["Ascending"] = "Ascending";
7
+ /**
8
+ * From biggest to smallest.
9
+ */
10
+ SortDirection["Descending"] = "Descending";
11
+ })(SortDirection || (SortDirection = {}));
12
+ export const Sort = {
13
+ Direction: SortDirection,
8
14
  /**
9
- * Sorts records by a numeric property in ascending order
15
+ * Composes comparators.
10
16
  */
11
- byAscendingProperty: (property) => (a, b) => {
12
- return Sort.byAscending(a[property], b[property]);
17
+ compose: (...comparators) => {
18
+ return (first, second) => {
19
+ for (const comparator of comparators) {
20
+ const comparison = comparator(first, second);
21
+ if (comparison !== 0) {
22
+ return comparison;
23
+ }
24
+ }
25
+ return 0;
26
+ };
13
27
  },
14
28
  /**
15
- * Sorts numbers by ascending values
29
+ * Compares numbers in the selected direction.
30
+ * Defaults to Ascending.
16
31
  */
17
- byDescending: (a, b) => {
18
- return b - a;
32
+ numeric: (direction = SortDirection.Ascending) => {
33
+ switch (direction) {
34
+ case SortDirection.Ascending:
35
+ return (first, second) => first - second;
36
+ case SortDirection.Descending:
37
+ return (first, second) => second - first;
38
+ }
19
39
  },
20
40
  /**
21
- * Sorts records by a numeric property in descending order
41
+ * Compares records by a numeric property in the selected direction.
42
+ * Defaults to Ascending.
22
43
  */
23
- byDescendingProperty: (property) => (a, b) => {
24
- return Sort.byDescending(a[property], b[property]);
44
+ byNumericProperty: (property, direction = SortDirection.Ascending) => {
45
+ const compare = Sort.numeric(direction);
46
+ return (first, second) => compare(first[property], second[property]);
25
47
  },
26
48
  };
27
49
  //# sourceMappingURL=Sort.js.map
package/dist/Sort.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Sort.js","sourceRoot":"","sources":["../src/Sort.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB;;OAEG;IACH,WAAW,EAAE,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;QAC5C,OAAO,CAAC,GAAG,CAAC,CAAA;IACd,CAAC;IAED;;OAEG;IACH,mBAAmB,EACjB,CAAgC,QAAmB,EAAE,EAAE,CACvD,CAA4C,CAAU,EAAE,CAAU,EAAU,EAAE;QAC5E,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;IACnD,CAAC;IAEH;;OAEG;IACH,YAAY,EAAE,CAAC,CAAS,EA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E,MAAM,EAAE,EAAE,CAAC,MAAM,GAAG,KAAK,CAAA;QAC5C,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,iBAAiB,EAAE,CAAgC,QAAmB,EAAE,SAAS,GAAkB,aAAa,CAAC,SAAS,EAAE,EAAE;QAC5H,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QACvC,OAAO,CAA4C,KAAc,EAAE,MAAe,EAAU,EAAE,CAC5F,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC9C,CAAC;CACF,CAAA"}
@@ -13,6 +13,7 @@ export { Profile } from "./Profile.js";
13
13
  export { Range } from "./Range.js";
14
14
  export { Scalar } from "./Scalar.js";
15
15
  export { TypeGuard } from "./TypeGuard.js";
16
+ export { typedParse, safeTypedParse } from "./typedParse.js";
16
17
  export { setTimeoutAsync } from "./setTimeoutAsync.js";
17
18
  export { noop, asyncNoop } from "./noop.js";
18
19
  export { Logger } from "./logging/Logger.js";
@@ -25,7 +26,7 @@ export type { LogContext } from "./logging/log-context/LogContext.js";
25
26
  export type { LoggerContext } from "./logging/log-context/LoggerContext.js";
26
27
  export type { LogContextProvider } from "./logging/log-context/LogContextProvider.js";
27
28
  export { debounce } from "./debounce.js";
28
- export { Sort } from "./Sort.js";
29
+ export { Sort, type Comparator } from "./Sort.js";
29
30
  export { Rng, type RngState } from "./rng/Rng.js";
30
31
  export type { Generator } from "./rng/Generator.js";
31
32
  export { createGeneratorStub } from "./rng/Generator.stub.js";
@@ -12,6 +12,7 @@ export { Profile } from "./Profile.js";
12
12
  export { Range } from "./Range.js";
13
13
  export { Scalar } from "./Scalar.js";
14
14
  export { TypeGuard } from "./TypeGuard.js";
15
+ export { typedParse, safeTypedParse } from "./typedParse.js";
15
16
  export { setTimeoutAsync } from "./setTimeoutAsync.js";
16
17
  export { noop, asyncNoop } from "./noop.js";
17
18
  export { Logger } from "./logging/Logger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EAAE,OAAO,EAAY,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAgB,OAAO,EAAgE,MAAM,YAAY,CAAA;AAChH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,29 @@
1
+ import type { z } from "zod";
2
+ import type { DeepUnbranded } from "./Brand.js";
3
+ /**
4
+ * We use zod schemas on unknown inputs to parse & validate the data.
5
+ * However, when you have already parsed data (usually because it is trusted data) and want to validate, using schema.parse is bad because the parameter is `unknown`, so you don't get feedback from TypeScript.
6
+ *
7
+ * Use this `typedParse` method instead, which accepts as input a strongly typed but unbranded version of the data and outputs a branded version of it, after validation.
8
+ *
9
+ * This is really just a schema.parse() with type safe inputs when you only need to run the validation part of the schema.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * typedParse(IntegerSchema, 42) // ✓
14
+ * typedParse(IntegerSchema, 42.5) // throws
15
+ * typedParse(IntegerSchema, "42") // TS error
16
+ * ```
17
+ */
18
+ export declare function typedParse<TSchema extends z.ZodType>(schema: TSchema, value: DeepUnbranded<z.output<TSchema>>): z.output<TSchema>;
19
+ /**
20
+ * The safeParse counterpart to {@link typedParse}
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * safeTypedParse(IntegerSchema, 42) // ✓
25
+ * safeTypedParse(IntegerSchema, 42.5) // returns success = false
26
+ * safeTypedParse(IntegerSchema, "42") // TS error
27
+ * ```
28
+ */
29
+ export declare function safeTypedParse<TSchema extends z.ZodType>(schema: TSchema, value: DeepUnbranded<z.output<TSchema>>): z.ZodSafeParseResult<z.output<TSchema>>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * We use zod schemas on unknown inputs to parse & validate the data.
3
+ * However, when you have already parsed data (usually because it is trusted data) and want to validate, using schema.parse is bad because the parameter is `unknown`, so you don't get feedback from TypeScript.
4
+ *
5
+ * Use this `typedParse` method instead, which accepts as input a strongly typed but unbranded version of the data and outputs a branded version of it, after validation.
6
+ *
7
+ * This is really just a schema.parse() with type safe inputs when you only need to run the validation part of the schema.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * typedParse(IntegerSchema, 42) // ✓
12
+ * typedParse(IntegerSchema, 42.5) // throws
13
+ * typedParse(IntegerSchema, "42") // TS error
14
+ * ```
15
+ */
16
+ export function typedParse(schema, value) {
17
+ return schema.parse(value);
18
+ }
19
+ /**
20
+ * The safeParse counterpart to {@link typedParse}
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * safeTypedParse(IntegerSchema, 42) // ✓
25
+ * safeTypedParse(IntegerSchema, 42.5) // returns success = false
26
+ * safeTypedParse(IntegerSchema, "42") // TS error
27
+ * ```
28
+ */
29
+ export function safeTypedParse(schema, value) {
30
+ return schema.safeParse(value);
31
+ }
32
+ //# sourceMappingURL=typedParse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typedParse.js","sourceRoot":"","sources":["../src/typedParse.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,UAAU,CAA4B,MAAe,EAAE,KAAuC;IAC5G,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAC5B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAe,EACf,KAAuC;IAEvC,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAChC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guillaume-docquier/tools-ts",
3
- "version": "8.6.1",
3
+ "version": "9.1.0",
4
4
  "description": "My personal collection of typescript tools",
5
5
  "homepage": "https://github.com/Guillaume-Docquier/tools-ts",
6
6
  "license": "MIT",
@@ -47,7 +47,16 @@
47
47
  "semantic-release": "^25.0.9",
48
48
  "typescript": "~7.0.2",
49
49
  "vite": "^8.3.0",
50
- "vitest": "^5.0.0"
50
+ "vitest": "^5.0.0",
51
+ "zod": "^4.6.5"
52
+ },
53
+ "peerDependencies": {
54
+ "zod": "^4.6.5"
55
+ },
56
+ "peerDependenciesMeta": {
57
+ "zod": {
58
+ "optional": true
59
+ }
51
60
  },
52
61
  "lint-staged": {
53
62
  "*.{md,json,yml,yaml,css,scss}": "oxfmt --no-error-on-unmatched-pattern",