@elyukai/utils 0.2.8 → 0.3.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/{array → src/array}/filters.js +4 -4
  3. package/dist/{array → src/array}/reductions.js +2 -2
  4. package/dist/src/array/transformations.d.ts +27 -0
  5. package/dist/src/array/transformations.js +34 -0
  6. package/dist/{async.js → src/async.js} +2 -2
  7. package/dist/{classList.js → src/classList.js} +1 -1
  8. package/dist/{equality.js → src/equality.js} +3 -8
  9. package/dist/{function.js → src/function.js} +2 -2
  10. package/dist/{maybe.js → src/maybe.js} +2 -4
  11. package/dist/{nullable.js → src/nullable.js} +1 -1
  12. package/dist/{object.js → src/object.js} +1 -1
  13. package/dist/src/parser.d.ts +146 -0
  14. package/dist/src/parser.js +219 -0
  15. package/dist/{reader.js → src/reader.js} +10 -10
  16. package/dist/{result.js → src/result.js} +3 -3
  17. package/dist/src/state.d.ts +51 -0
  18. package/dist/src/state.js +79 -0
  19. package/dist/src/stateParser.d.ts +143 -0
  20. package/dist/src/stateParser.js +219 -0
  21. package/dist/{string → src/string}/number.js +3 -11
  22. package/dist/{string.js → src/string.js} +6 -13
  23. package/package.json +6 -6
  24. package/dist/array/generators.d.ts +0 -13
  25. package/dist/array/generators.js +0 -17
  26. /package/dist/{array → src/array}/filters.d.ts +0 -0
  27. /package/dist/{array → src/array}/fixed.d.ts +0 -0
  28. /package/dist/{array → src/array}/fixed.js +0 -0
  29. /package/dist/{array → src/array}/groups.d.ts +0 -0
  30. /package/dist/{array → src/array}/groups.js +0 -0
  31. /package/dist/{array → src/array}/modify.d.ts +0 -0
  32. /package/dist/{array → src/array}/modify.js +0 -0
  33. /package/dist/{array → src/array}/nonEmpty.d.ts +0 -0
  34. /package/dist/{array → src/array}/nonEmpty.js +0 -0
  35. /package/dist/{array → src/array}/reductions.d.ts +0 -0
  36. /package/dist/{array → src/array}/sets.d.ts +0 -0
  37. /package/dist/{array → src/array}/sets.js +0 -0
  38. /package/dist/{async.d.ts → src/async.d.ts} +0 -0
  39. /package/dist/{classList.d.ts → src/classList.d.ts} +0 -0
  40. /package/dist/{dictionary → src/dictionary}/native.d.ts +0 -0
  41. /package/dist/{dictionary → src/dictionary}/native.js +0 -0
  42. /package/dist/{dictionary.d.ts → src/dictionary.d.ts} +0 -0
  43. /package/dist/{dictionary.js → src/dictionary.js} +0 -0
  44. /package/dist/{equality.d.ts → src/equality.d.ts} +0 -0
  45. /package/dist/{function.d.ts → src/function.d.ts} +0 -0
  46. /package/dist/{lazy.d.ts → src/lazy.d.ts} +0 -0
  47. /package/dist/{lazy.js → src/lazy.js} +0 -0
  48. /package/dist/{maybe.d.ts → src/maybe.d.ts} +0 -0
  49. /package/dist/{nullable.d.ts → src/nullable.d.ts} +0 -0
  50. /package/dist/{number.d.ts → src/number.d.ts} +0 -0
  51. /package/dist/{number.js → src/number.js} +0 -0
  52. /package/dist/{object.d.ts → src/object.d.ts} +0 -0
  53. /package/dist/{ordering.d.ts → src/ordering.d.ts} +0 -0
  54. /package/dist/{ordering.js → src/ordering.js} +0 -0
  55. /package/dist/{range.d.ts → src/range.d.ts} +0 -0
  56. /package/dist/{range.js → src/range.js} +0 -0
  57. /package/dist/{reader.d.ts → src/reader.d.ts} +0 -0
  58. /package/dist/{result.d.ts → src/result.d.ts} +0 -0
  59. /package/dist/{roman.d.ts → src/roman.d.ts} +0 -0
  60. /package/dist/{roman.js → src/roman.js} +0 -0
  61. /package/dist/{string → src/string}/number.d.ts +0 -0
  62. /package/dist/{string → src/string}/regex.d.ts +0 -0
  63. /package/dist/{string → src/string}/regex.js +0 -0
  64. /package/dist/{string.d.ts → src/string.d.ts} +0 -0
  65. /package/dist/{typeSafety.d.ts → src/typeSafety.d.ts} +0 -0
  66. /package/dist/{typeSafety.js → src/typeSafety.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyukai/utils",
3
- "version": "0.2.8",
3
+ "version": "0.3.0",
4
4
  "description": "A set of JavaScript helper functions.",
5
5
  "files": [
6
6
  "dist",
@@ -9,7 +9,7 @@
9
9
  "CHANGELOG.md"
10
10
  ],
11
11
  "exports": {
12
- "./*": "./dist/*.js"
12
+ "./*": "./dist/src/*.js"
13
13
  },
14
14
  "scripts": {
15
15
  "build": "tsc -b",
@@ -33,14 +33,14 @@
33
33
  "homepage": "https://github.com/elyukai/ts-utils#readme",
34
34
  "devDependencies": {
35
35
  "@eslint/js": "^10.0.1",
36
- "@types/node": "^25.3.0",
36
+ "@types/node": "^25.3.3",
37
37
  "commit-and-tag-version": "^12.6.1",
38
- "eslint": "^10.0.1",
39
- "eslint-plugin-jsdoc": "^62.7.0",
38
+ "eslint": "^10.0.2",
39
+ "eslint-plugin-jsdoc": "^62.7.1",
40
40
  "prettier": "^3.8.1",
41
41
  "tsx": "^4.21.0",
42
42
  "typescript": "^5.9.3",
43
- "typescript-eslint": "^8.56.0"
43
+ "typescript-eslint": "^8.56.1"
44
44
  },
45
45
  "type": "module"
46
46
  }
@@ -1,13 +0,0 @@
1
- /**
2
- * Utility functions for generating new arrays.
3
- * @module
4
- */
5
- /**
6
- * Returns the possibilities of all the combinations of nested array values.
7
- *
8
- * @example
9
- *
10
- * flatCombine([["a", "b"], ["c"]]) // [["a", "c"], ["b", "c"]]
11
- * flatCombine([["a", "b"], ["c", "d"]]) // [["a", "c"], ["b", "c"], ["a", "d"], ["b", "d"]]
12
- */
13
- export declare const flatCombine: <T>(arr: T[][]) => T[][];
@@ -1,17 +0,0 @@
1
- /**
2
- * Utility functions for generating new arrays.
3
- * @module
4
- */
5
- /**
6
- * Returns the possibilities of all the combinations of nested array values.
7
- *
8
- * @example
9
- *
10
- * flatCombine([["a", "b"], ["c"]]) // [["a", "c"], ["b", "c"]]
11
- * flatCombine([["a", "b"], ["c", "d"]]) // [["a", "c"], ["b", "c"], ["a", "d"], ["b", "d"]]
12
- */
13
- export const flatCombine = (arr) => arr.length === 0
14
- ? []
15
- : arr.slice(1).reduce((acc, elem) => elem.flatMap((elemInner) => acc.map((accElem) => [...accElem, elemInner])),
16
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- it is checked before if the array is empty
17
- arr[0].map((elem) => [elem]));
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes