@guillaume-docquier/tools-ts 7.2.1 → 7.3.1

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/dist/Sort.d.ts CHANGED
@@ -7,4 +7,12 @@ export declare const Sort: {
7
7
  * Sorts records by a numeric property in ascending order
8
8
  */
9
9
  byAscendingProperty: <TProperty extends PropertyKey>(property: TProperty) => <TRecord extends Record<TProperty, number>>(a: TRecord, b: TRecord) => number;
10
+ /**
11
+ * Sorts numbers by ascending values
12
+ */
13
+ byDescending: (a: number, b: number) => number;
14
+ /**
15
+ * Sorts records by a numeric property in descending order
16
+ */
17
+ byDescendingProperty: <TProperty extends PropertyKey>(property: TProperty) => <TRecord extends Record<TProperty, number>>(a: TRecord, b: TRecord) => number;
10
18
  };
package/dist/Sort.js CHANGED
@@ -11,5 +11,17 @@ export const Sort = {
11
11
  byAscendingProperty: (property) => (a, b) => {
12
12
  return Sort.byAscending(a[property], b[property]);
13
13
  },
14
+ /**
15
+ * Sorts numbers by ascending values
16
+ */
17
+ byDescending: (a, b) => {
18
+ return b - a;
19
+ },
20
+ /**
21
+ * Sorts records by a numeric property in descending order
22
+ */
23
+ byDescendingProperty: (property) => (a, b) => {
24
+ return Sort.byDescending(a[property], b[property]);
25
+ },
14
26
  };
15
27
  //# 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;CACJ,CAAA"}
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,EAAE,CAAS,EAAU,EAAE;QAC7C,OAAO,CAAC,GAAG,CAAC,CAAA;IACd,CAAC;IAED;;OAEG;IACH,oBAAoB,EAClB,CAAgC,QAAmB,EAAE,EAAE,CACvD,CAA4C,CAAU,EAAE,CAAU,EAAU,EAAE;QAC5E,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;IACpD,CAAC;CACJ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guillaume-docquier/tools-ts",
3
- "version": "7.2.1",
3
+ "version": "7.3.1",
4
4
  "description": "My personal collection of typescript tools",
5
5
  "homepage": "https://github.com/Guillaume-Docquier/tools-ts",
6
6
  "license": "MIT",
@@ -24,30 +24,30 @@
24
24
  "provenance": true
25
25
  },
26
26
  "dependencies": {
27
- "@logtape/logtape": "^2.3.0",
28
- "@logtape/redaction": "^2.3.0"
27
+ "@logtape/logtape": "^2.3.2",
28
+ "@logtape/redaction": "^2.3.2"
29
29
  },
30
30
  "devDependencies": {
31
- "@guillaume-docquier/oxfmt": "^1.0.5",
32
- "@guillaume-docquier/oxlint": "^1.2.3",
31
+ "@guillaume-docquier/oxfmt": "^1.0.6",
32
+ "@guillaume-docquier/oxlint": "^1.4.1",
33
33
  "@semantic-release/commit-analyzer": "^13.0.1",
34
34
  "@semantic-release/exec": "^7.1.0",
35
35
  "@semantic-release/github": "^12.0.9",
36
36
  "@semantic-release/release-notes-generator": "^14.1.1",
37
37
  "@types/node": "^25.9.5",
38
- "@vitest/coverage-v8": "^4.1.10",
38
+ "@vitest/coverage-v8": "^4.1.11",
39
39
  "conventional-changelog-conventionalcommits": "^9.3.1",
40
40
  "husky": "^9.1.7",
41
41
  "jiti": "^2.7.0",
42
42
  "lint-staged": "^16.4.0",
43
- "oxfmt": ">=0.62.0",
44
- "oxlint": "^1.77.0",
43
+ "oxfmt": ">=0.65.0",
44
+ "oxlint": "^1.80.0",
45
45
  "oxlint-tsgolint": "^7.0.2001",
46
46
  "semantic-release": "^25.0.9",
47
47
  "typescript": "~7.0.2",
48
- "vite": "^8.2.0",
49
- "vitest": "^4.1.10",
50
- "node": "runtime:26.5.0"
48
+ "vite": "^8.2.2",
49
+ "vitest": "^4.1.11",
50
+ "node": "runtime:26.8.1"
51
51
  },
52
52
  "lint-staged": {
53
53
  "*.{md,json,yml,yaml,css,scss}": "oxfmt --no-error-on-unmatched-pattern",
@@ -59,12 +59,12 @@
59
59
  "devEngines": {
60
60
  "packageManager": {
61
61
  "name": "pnpm",
62
- "version": "11.20.0",
62
+ "version": "11.24.0",
63
63
  "onFail": "download"
64
64
  },
65
65
  "runtime": {
66
66
  "name": "node",
67
- "version": "26.5.0",
67
+ "version": "26.8.1",
68
68
  "onFail": "download"
69
69
  }
70
70
  },