@duplojs/utils 1.3.20 → 1.3.22

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/README.md +21 -1
  2. package/dist/array/index.cjs +3 -0
  3. package/dist/array/index.d.ts +1 -0
  4. package/dist/array/index.mjs +1 -0
  5. package/dist/array/select.cjs +35 -0
  6. package/dist/array/select.d.ts +18 -0
  7. package/dist/array/select.mjs +32 -0
  8. package/dist/clean/constraint/base.d.ts +1 -1
  9. package/dist/clean/constraint/defaultConstraint/number.d.ts +4 -4
  10. package/dist/clean/constraint/defaultConstraint/string.d.ts +3 -3
  11. package/dist/clean/entity.cjs +4 -0
  12. package/dist/clean/entity.d.ts +1 -0
  13. package/dist/clean/entity.mjs +4 -0
  14. package/dist/clean/flag.d.ts +1 -0
  15. package/dist/clean/repository.d.ts +4 -4
  16. package/dist/clean/useCase.cjs +4 -3
  17. package/dist/clean/useCase.d.ts +2 -2
  18. package/dist/clean/useCase.mjs +4 -3
  19. package/dist/common/index.d.ts +1 -1
  20. package/dist/common/{toJson.d.ts → toJSON.d.ts} +1 -1
  21. package/dist/dataParser/extended/object.cjs +16 -4
  22. package/dist/dataParser/extended/object.d.ts +13 -5
  23. package/dist/dataParser/extended/object.mjs +20 -8
  24. package/dist/dataParser/identifier.d.ts +2 -2
  25. package/dist/dataParser/index.cjs +4 -0
  26. package/dist/dataParser/index.mjs +4 -4
  27. package/dist/dataParser/parsers/array/index.d.ts +1 -1
  28. package/dist/dataParser/parsers/object/omit.cjs +5 -1
  29. package/dist/dataParser/parsers/object/omit.d.ts +2 -1
  30. package/dist/dataParser/parsers/object/omit.mjs +5 -2
  31. package/dist/dataParser/parsers/object/partial.cjs +5 -1
  32. package/dist/dataParser/parsers/object/partial.d.ts +1 -0
  33. package/dist/dataParser/parsers/object/partial.mjs +5 -2
  34. package/dist/dataParser/parsers/object/pick.cjs +6 -2
  35. package/dist/dataParser/parsers/object/pick.d.ts +3 -2
  36. package/dist/dataParser/parsers/object/pick.mjs +6 -3
  37. package/dist/dataParser/parsers/object/required.cjs +5 -1
  38. package/dist/dataParser/parsers/object/required.d.ts +1 -0
  39. package/dist/dataParser/parsers/object/required.mjs +5 -2
  40. package/dist/dataParser/parsers/refine.cjs +1 -1
  41. package/dist/dataParser/parsers/refine.d.ts +1 -1
  42. package/dist/dataParser/parsers/refine.mjs +1 -1
  43. package/dist/either/future/create.d.ts +1 -1
  44. package/dist/generator/asyncChunk.cjs +24 -0
  45. package/dist/generator/asyncChunk.d.ts +2 -0
  46. package/dist/generator/asyncChunk.mjs +22 -0
  47. package/dist/generator/asyncLoop.d.ts +3 -10
  48. package/dist/generator/asyncMap.cjs +1 -1
  49. package/dist/generator/asyncMap.d.ts +2 -2
  50. package/dist/generator/asyncMap.mjs +1 -1
  51. package/dist/generator/index.cjs +2 -0
  52. package/dist/generator/index.d.ts +1 -0
  53. package/dist/generator/index.mjs +1 -0
  54. package/dist/generator/loop.d.ts +4 -5
  55. package/dist/index.cjs +2 -2
  56. package/dist/index.mjs +1 -1
  57. package/dist/metadata.json +4419 -0
  58. package/dist/object/omit.d.ts +2 -2
  59. package/dist/object/pick.d.ts +2 -2
  60. package/dist/string/capitalize.cjs +1 -1
  61. package/dist/string/capitalize.mjs +1 -1
  62. package/dist/string/uncapitalize.cjs +1 -1
  63. package/dist/string/uncapitalize.mjs +1 -1
  64. package/package.json +37 -5
  65. /package/dist/common/{toJson.cjs → toJSON.cjs} +0 -0
  66. /package/dist/common/{toJson.mjs → toJSON.mjs} +0 -0
@@ -3,6 +3,6 @@ import { type Adaptor } from "../common/types/adaptor";
3
3
  import { type GetPropsWithValue } from "./types/getPropsWithValue";
4
4
  import { type PartialKeys } from "./types";
5
5
  type ComputeResultWithOmitIsObject<GenericInput extends object, GenericOmitValue extends Partial<Record<keyof GenericInput, boolean>>> = SimplifyTopLevel<Omit<GenericInput, GetPropsWithValue<GenericOmitValue, true>> extends infer InferredValue extends object ? PartialKeys<InferredValue, Adaptor<GetPropsWithValue<GenericOmitValue, boolean> | GetPropsWithValue<GenericOmitValue, boolean | undefined> | GetPropsWithValue<GenericOmitValue, true | undefined>, keyof InferredValue>> : never>;
6
- export declare function omit<GenericInput extends object, GenericValue extends boolean, GenericOmitValue extends Partial<Record<keyof GenericInput, GenericValue>> | readonly (keyof GenericInput)[]>(omitValue: GenericOmitValue): (input: GenericInput) => GenericOmitValue extends Partial<Record<keyof GenericInput, boolean>> ? ComputeResultWithOmitIsObject<GenericInput, GenericOmitValue> : SimplifyTopLevel<Omit<GenericInput, Adaptor<GenericOmitValue, ObjectKey[]>[number]>>;
7
- export declare function omit<GenericInput extends object, GenericOmitValue extends Partial<Record<keyof GenericInput, boolean>> | readonly (keyof GenericInput)[]>(input: GenericInput, omitValue: GenericOmitValue): GenericOmitValue extends Partial<Record<keyof GenericInput, boolean>> ? ComputeResultWithOmitIsObject<GenericInput, GenericOmitValue> : SimplifyTopLevel<Omit<GenericInput, Adaptor<GenericOmitValue, ObjectKey[]>[number]>>;
6
+ export declare function omit<GenericInput extends object, const GenericOmitValue extends Partial<Record<keyof GenericInput, boolean>> | readonly (keyof GenericInput)[]>(omitValue: GenericOmitValue): (input: GenericInput) => GenericOmitValue extends Partial<Record<keyof GenericInput, boolean>> ? ComputeResultWithOmitIsObject<GenericInput, GenericOmitValue> : SimplifyTopLevel<Omit<GenericInput, Adaptor<GenericOmitValue, readonly ObjectKey[]>[number]>>;
7
+ export declare function omit<GenericInput extends object, const GenericOmitValue extends Partial<Record<keyof GenericInput, boolean>> | readonly (keyof GenericInput)[]>(input: GenericInput, omitValue: GenericOmitValue): GenericOmitValue extends Partial<Record<keyof GenericInput, boolean>> ? ComputeResultWithOmitIsObject<GenericInput, GenericOmitValue> : SimplifyTopLevel<Omit<GenericInput, Adaptor<GenericOmitValue, readonly ObjectKey[]>[number]>>;
8
8
  export {};
@@ -2,6 +2,6 @@ import { type ObjectKey, type SimplifyTopLevel } from "../common";
2
2
  import { type Adaptor } from "../common/types/adaptor";
3
3
  import { type GetPropsWithValue } from "./types/getPropsWithValue";
4
4
  type ComputeResultWithPickIsObject<GenericInput extends object, GenericPickValue extends Partial<Record<keyof GenericInput, boolean>>> = SimplifyTopLevel<Pick<GenericInput, Adaptor<GetPropsWithValue<GenericPickValue, true>, keyof GenericInput>> & Partial<Pick<GenericInput, Adaptor<GetPropsWithValue<GenericPickValue, boolean> | GetPropsWithValue<GenericPickValue, boolean | undefined> | GetPropsWithValue<GenericPickValue, true | undefined>, keyof GenericInput>>>>;
5
- export declare function pick<GenericInput extends object, GenericValue extends boolean, GenericPickValue extends Partial<Record<keyof GenericInput, GenericValue>> | readonly (keyof GenericInput)[]>(pickValue: GenericPickValue): (input: GenericInput) => GenericPickValue extends Partial<Record<keyof GenericInput, boolean>> ? ComputeResultWithPickIsObject<GenericInput, GenericPickValue> : SimplifyTopLevel<Pick<GenericInput, Adaptor<GenericPickValue, ObjectKey[]>[number]>>;
6
- export declare function pick<GenericInput extends object, GenericPickValue extends Partial<Record<keyof GenericInput, boolean>> | readonly (keyof GenericInput)[]>(input: GenericInput, pickValue: GenericPickValue): GenericPickValue extends Partial<Record<keyof GenericInput, boolean>> ? ComputeResultWithPickIsObject<GenericInput, GenericPickValue> : SimplifyTopLevel<Pick<GenericInput, Adaptor<GenericPickValue, ObjectKey[]>[number]>>;
5
+ export declare function pick<GenericInput extends object, const GenericPickValue extends Partial<Record<keyof GenericInput, boolean>> | readonly (keyof GenericInput)[]>(pickValue: GenericPickValue): (input: GenericInput) => GenericPickValue extends Partial<Record<keyof GenericInput, boolean>> ? ComputeResultWithPickIsObject<GenericInput, GenericPickValue> : SimplifyTopLevel<Pick<GenericInput, Adaptor<GenericPickValue, readonly ObjectKey[]>[number]>>;
6
+ export declare function pick<GenericInput extends object, const GenericPickValue extends Partial<Record<keyof GenericInput, boolean>> | readonly (keyof GenericInput)[]>(input: GenericInput, pickValue: GenericPickValue): GenericPickValue extends Partial<Record<keyof GenericInput, boolean>> ? ComputeResultWithPickIsObject<GenericInput, GenericPickValue> : SimplifyTopLevel<Pick<GenericInput, Adaptor<GenericPickValue, readonly ObjectKey[]>[number]>>;
7
7
  export {};
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  function capitalize(input) {
4
- return (input.charAt(0).toUpperCase() + input.slice(1));
4
+ return `${input.charAt(0).toUpperCase()}${input.slice(1)}`;
5
5
  }
6
6
 
7
7
  exports.capitalize = capitalize;
@@ -1,5 +1,5 @@
1
1
  function capitalize(input) {
2
- return (input.charAt(0).toUpperCase() + input.slice(1));
2
+ return `${input.charAt(0).toUpperCase()}${input.slice(1)}`;
3
3
  }
4
4
 
5
5
  export { capitalize };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  function uncapitalize(input) {
4
- return (input.charAt(0).toLowerCase() + input.slice(1));
4
+ return `${input.charAt(0).toLowerCase()}${input.slice(1)}`;
5
5
  }
6
6
 
7
7
  exports.uncapitalize = uncapitalize;
@@ -1,5 +1,5 @@
1
1
  function uncapitalize(input) {
2
- return (input.charAt(0).toLowerCase() + input.slice(1));
2
+ return `${input.charAt(0).toLowerCase()}${input.slice(1)}`;
3
3
  }
4
4
 
5
5
  export { uncapitalize };
package/package.json CHANGED
@@ -1,7 +1,16 @@
1
1
  {
2
2
  "name": "@duplojs/utils",
3
- "version": "1.3.20",
4
- "author": "mathcovax",
3
+ "version": "1.3.22",
4
+ "author": {
5
+ "name": "mathcovax",
6
+ "url": "https://github.com/mathcovax"
7
+ },
8
+ "contributors": [
9
+ {
10
+ "name": "zeriix",
11
+ "url": "https://github.com/ZeRiix"
12
+ }
13
+ ],
5
14
  "license": "MIT",
6
15
  "type": "module",
7
16
  "repository": {
@@ -10,11 +19,14 @@
10
19
  },
11
20
  "scripts": {
12
21
  "build": "rollup --config",
22
+ "docs:dev": "npm -w docs run docs:dev",
23
+ "docs:build": "npm -w docs run docs:build",
24
+ "docs:preview": "npm -w docs run docs:preview",
13
25
  "test:tu": "vitest --coverage",
14
26
  "test:tu:bench": "vitest bench",
15
27
  "test:tu:watch": "vitest --coverage --watch",
16
28
  "test:tu:update": "vitest --coverage --update",
17
- "test:types": "tsc -p tsconfig.test.json",
29
+ "test:types": "tsc -p tsconfig.test.json && npm -w docs run test:types",
18
30
  "test:lint": "eslint",
19
31
  "test:lint:fix": "eslint --fix",
20
32
  "prepare": "husky"
@@ -100,6 +112,7 @@
100
112
  "devDependencies": {
101
113
  "@commitlint/cli": "19.8.1",
102
114
  "@commitlint/config-conventional": "19.8.1",
115
+ "@duplojs/dev-tools": "0.1.0",
103
116
  "@duplojs/eslint": "0.5.0",
104
117
  "@rollup/plugin-typescript": "12.1.4",
105
118
  "@types/node": "24.3.0",
@@ -117,9 +130,28 @@
117
130
  "vitest": "3.2.4"
118
131
  },
119
132
  "workspaces": [
120
- "integration"
133
+ "integration",
134
+ "docs"
135
+ ],
136
+ "keywords": [
137
+ "typescript",
138
+ "utils",
139
+ "functional-programming",
140
+ "immutable",
141
+ "pipe",
142
+ "curry",
143
+ "data-parser",
144
+ "pattern-matching",
145
+ "either",
146
+ "monad",
147
+ "array-utils",
148
+ "object-utils",
149
+ "string-utils",
150
+ "date-utils",
151
+ "ddd",
152
+ "clean-architecture",
153
+ "duplojs"
121
154
  ],
122
- "keywords": [],
123
155
  "engines": {
124
156
  "node": ">=22.15.1"
125
157
  }
File without changes
File without changes