@hichchi/utils 0.0.1-alpha.1 → 0.0.1-beta.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.
Files changed (106) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +6236 -1032
  3. package/constants/constants.d.ts +223 -0
  4. package/constants/constants.js +227 -0
  5. package/constants/constants.js.map +1 -0
  6. package/constants/english-inflection-rules.d.ts +53 -0
  7. package/constants/english-inflection-rules.js +360 -0
  8. package/constants/english-inflection-rules.js.map +1 -0
  9. package/constants/index.d.ts +2 -0
  10. package/constants/index.js +6 -0
  11. package/constants/index.js.map +1 -0
  12. package/enums/index.d.ts +1 -0
  13. package/{src → enums}/index.js +1 -1
  14. package/enums/index.js.map +1 -0
  15. package/enums/template-tag.enum.d.ts +33 -0
  16. package/enums/template-tag.enum.js +39 -0
  17. package/enums/template-tag.enum.js.map +1 -0
  18. package/index.d.ts +5 -0
  19. package/index.js +9 -0
  20. package/index.js.map +1 -0
  21. package/interfaces/index.d.ts +3 -0
  22. package/interfaces/index.js +7 -0
  23. package/interfaces/index.js.map +1 -0
  24. package/interfaces/infinite-object.interface.d.ts +45 -0
  25. package/interfaces/infinite-object.interface.js +3 -0
  26. package/interfaces/infinite-object.interface.js.map +1 -0
  27. package/interfaces/inflection-rule.interfaces.d.ts +142 -0
  28. package/interfaces/inflection-rule.interfaces.js +3 -0
  29. package/interfaces/inflection-rule.interfaces.js.map +1 -0
  30. package/interfaces/path-value-set.interface.d.ts +79 -0
  31. package/interfaces/path-value-set.interface.js +3 -0
  32. package/interfaces/path-value-set.interface.js.map +1 -0
  33. package/package.json +4 -4
  34. package/readme-top.md +182 -6
  35. package/types/deep-partial.type.d.ts +47 -0
  36. package/types/deep-partial.type.js +3 -0
  37. package/types/deep-partial.type.js.map +1 -0
  38. package/types/index.d.ts +34 -0
  39. package/types/index.js +38 -0
  40. package/types/index.js.map +1 -0
  41. package/types/is-already-in-path.type.d.ts +24 -0
  42. package/types/is-already-in-path.type.js +3 -0
  43. package/types/is-already-in-path.type.js.map +1 -0
  44. package/types/is-empty.type.d.ts +25 -0
  45. package/types/is-empty.type.js +3 -0
  46. package/types/is-empty.type.js.map +1 -0
  47. package/types/is-primitive.type.d.ts +27 -0
  48. package/types/is-primitive.type.js +4 -0
  49. package/types/is-primitive.type.js.map +1 -0
  50. package/types/literal-object.type.d.ts +49 -0
  51. package/types/literal-object.type.js +3 -0
  52. package/types/literal-object.type.js.map +1 -0
  53. package/{src/lib/types.d.ts → types/loose-autocomplete.type.d.ts} +18 -6
  54. package/types/loose-autocomplete.type.js +3 -0
  55. package/types/loose-autocomplete.type.js.map +1 -0
  56. package/types/partial-with-null.type.d.ts +27 -0
  57. package/types/partial-with-null.type.js +3 -0
  58. package/types/partial-with-null.type.js.map +1 -0
  59. package/types/prettify.type.d.ts +23 -0
  60. package/types/prettify.type.js +3 -0
  61. package/types/prettify.type.js.map +1 -0
  62. package/types/type.type.d.ts +21 -0
  63. package/{src/lib/interfaces.js → types/type.type.js} +1 -1
  64. package/types/type.type.js.map +1 -0
  65. package/utils/assertions.utils.d.ts +150 -0
  66. package/utils/assertions.utils.js +163 -0
  67. package/utils/assertions.utils.js.map +1 -0
  68. package/utils/file.utils.d.ts +87 -0
  69. package/{src/lib → utils}/file.utils.js +78 -26
  70. package/utils/file.utils.js.map +1 -0
  71. package/{src/lib → utils}/index.d.ts +3 -5
  72. package/{src/lib → utils}/index.js +3 -5
  73. package/utils/index.js.map +1 -0
  74. package/utils/object.utils.d.ts +912 -0
  75. package/utils/object.utils.js +1069 -0
  76. package/utils/object.utils.js.map +1 -0
  77. package/utils/string-template.utils.d.ts +169 -0
  78. package/utils/string-template.utils.js +269 -0
  79. package/utils/string-template.utils.js.map +1 -0
  80. package/utils/string.utils.d.ts +932 -0
  81. package/utils/string.utils.js +1255 -0
  82. package/utils/string.utils.js.map +1 -0
  83. package/utils/url.utils.d.ts +99 -0
  84. package/utils/url.utils.js +112 -0
  85. package/utils/url.utils.js.map +1 -0
  86. package/src/index.d.ts +0 -1
  87. package/src/index.js.map +0 -1
  88. package/src/lib/assertions.utils.d.ts +0 -55
  89. package/src/lib/assertions.utils.js +0 -68
  90. package/src/lib/assertions.utils.js.map +0 -1
  91. package/src/lib/file.utils.d.ts +0 -25
  92. package/src/lib/file.utils.js.map +0 -1
  93. package/src/lib/index.js.map +0 -1
  94. package/src/lib/interfaces.d.ts +0 -6
  95. package/src/lib/interfaces.js.map +0 -1
  96. package/src/lib/object.utils.d.ts +0 -265
  97. package/src/lib/object.utils.js +0 -414
  98. package/src/lib/object.utils.js.map +0 -1
  99. package/src/lib/string-template.utils.d.ts +0 -25
  100. package/src/lib/string-template.utils.js +0 -40
  101. package/src/lib/string-template.utils.js.map +0 -1
  102. package/src/lib/string.utils.d.ts +0 -217
  103. package/src/lib/string.utils.js +0 -314
  104. package/src/lib/string.utils.js.map +0 -1
  105. package/src/lib/types.js +0 -4
  106. package/src/lib/types.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.utils.js","sourceRoot":"","sources":["../../../../libs/utils/src/utils/object.utils.ts"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,qCAAqC;;;AAqBrC,4BAOC;AAuBD,8BAEC;AAqZD,oDAmBC;AAsED,oDAqCC;AA2XD,8BAEC;AAuGD,sCAOC;AA9iCD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,QAAQ,CAAI,GAAM;IAC9B,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAiB,CAAC;IAC7C,CAAC;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QACjD,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AACH,SAAgB,SAAS,CAAC,GAAiC,EAAE,KAAoB;IAC7E,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,IAAiB,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoGG;AACH,SAAgB,aAAa,CAAmB,CAAI;IAChD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAEhC,gEAAgE;IAChE,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;IAE9D,OAAO,aAAa,CAAC,CAAC,CAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAkB,CAAC,CAAC,CAAE,MAAuB,CAAC;AAClH,CAAC"}
@@ -0,0 +1,169 @@
1
+ /**
2
+ * Applies a value to a template string containing transformation tags.
3
+ *
4
+ * This function replaces template tags in a string with transformed versions of a provided value.
5
+ * It's particularly useful for creating dynamic messages, error notifications, or any text
6
+ * that needs to include the same value in different formats.
7
+ *
8
+ * Each template tag is replaced with the result of applying the corresponding transformation
9
+ * function to the provided value. If a tag isn't present in the template string, that
10
+ * transformation is skipped.
11
+ *
12
+ * Available template tags:
13
+ * - `#{upperCase}` - Converts to UPPERCASE ("USER")
14
+ * - `#{snakeCase}` - Converts to snake_case ("user_profile")
15
+ * - `#{upperSnakeCase}` - Converts to UPPER_SNAKE_CASE ("USER_PROFILE")
16
+ * - `#{lowerCase}` - Converts to lowercase ("user")
17
+ * - `#{sentenceCase}` - Converts to Sentence case ("User profile")
18
+ * - `#{firstCase}` - Converts to First case ("User")
19
+ * - `#{camelCase}` - Converts to camelCase ("userProfile")
20
+ * - `#{pascalCase}` - Converts to PascalCase ("UserProfile")
21
+ * - `#{kebabCase}` - Converts to kebab-case ("user-profile")
22
+ * - `#{upperKebabCase}` - Converts to KEBAB-CASE ("USER-PROFILE")
23
+ * - `#{titleCase}` - Converts to Title Case ("User Profile")
24
+ * - `#{lowerCaseBreak}` - Breaks words and converts to lowercase ("user profile")
25
+ * - `#{upperCaseBreak}` - Breaks words and converts to UPPERCASE ("USER PROFILE")
26
+ * - `#{firstCaseBreak}` - Breaks words and applies First case ("User profile")
27
+ * - `#{singular}` - Converts plural to singular form ("users" → "user")
28
+ * - `#{number}` - Converts to a number if possible ("123" → 123)
29
+ * - `#{htmlToText}` - Removes HTML tags ("<b>User</b>" → "User")
30
+ * - `#{format}` - Formats a string with placeholders (used with additional parameters)
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * // Error message with different versions of the same term
35
+ * applyTemplate(
36
+ * 'Cannot create a #{lowerCase} with this email. #{sentenceCase} already exists.',
37
+ * 'User'
38
+ * );
39
+ * // Output: "Cannot create a user with this email. User already exists."
40
+ * ```
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * // Using multiple transformations of the same value
45
+ * applyTemplate(
46
+ * 'Model: #{pascalCase}\nTable: #{snakeCase}\nAPI Path: #{kebabCase}',
47
+ * 'blogPost'
48
+ * );
49
+ * // Output:
50
+ * // Model: BlogPost
51
+ * // Table: blog_post
52
+ * // API Path: blog-post
53
+ * ```
54
+ *
55
+ * @param {string} str - Template string containing transformation tags
56
+ * @param {string} prefix - The prefix to update with
57
+ * @returns {string} - The template with all tags replaced by transformed values
58
+ *
59
+ * @see {@link TemplateTag} For the full list of available template tags
60
+ * @see {@link applyTemplates} For applying multiple different values to a template
61
+ */
62
+ export declare function applyTemplate(str: string, prefix: string): string;
63
+ /**
64
+ * Applies multiple named template transformations to a string with different values for each prefix.
65
+ *
66
+ * This advanced templating function allows you to use multiple different values within a single
67
+ * template string, each with their own set of transformation tags. Unlike `applyTemplate` which
68
+ * applies one value to all tags, this function lets you specify different values for different
69
+ * prefixes, enabling complex template scenarios with multiple entities.
70
+ *
71
+ * Each prefix in the template is identified by a namespace (e.g., `user`, `post`) followed by
72
+ * a dot and the transformation tag (e.g., `#{user.lowerCase}`, `#{post.titleCase}`). This allows
73
+ * for sophisticated template generation where different parts of the text need different source
74
+ * values with various transformations applied.
75
+ *
76
+ * This is particularly useful for generating complex messages, code templates, documentation,
77
+ * or any text that involves multiple entities that need to be formatted differently within
78
+ * the same template.
79
+ *
80
+ * @param {string} str - Template string containing namespaced transformation tags in the format
81
+ * `#{prefix.transformationType}` where prefix matches keys in the prefixes object
82
+ * @param {Record<string, string>} prefixes - Object mapping prefix names to their corresponding values.
83
+ * Each key becomes a namespace in the template, and the value
84
+ * is the string that will be transformed according to the tags.
85
+ * @returns {string} The template string with all namespaced tags replaced by their transformed values
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * // Multi-entity message generation
90
+ * const message = applyTemplates(
91
+ * 'User #{user.lowerCase} created a new #{entity.sentenceCase} titled "#{title.titleCase}"',
92
+ * {
93
+ * user: 'JohnDoe',
94
+ * entity: 'blogPost',
95
+ * title: 'my first programming tutorial'
96
+ * }
97
+ * );
98
+ * // Returns: "User johndoe created a new Blog post titled "My First Programming Tutorial""
99
+ * ```
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * // Code generation with multiple entities
104
+ * const codeTemplate = applyTemplates(
105
+ * `class #{model.pascalCase} {
106
+ * constructor(private #{service.camelCase}: #{service.pascalCase}Service) {}
107
+ *
108
+ * async create#{model.pascalCase}(data: #{model.pascalCase}Data): Promise<#{model.pascalCase}> {
109
+ * return this.#{service.camelCase}.create(data);
110
+ * }
111
+ * }`,
112
+ * {
113
+ * model: 'user-profile',
114
+ * service: 'database'
115
+ * }
116
+ * );
117
+ * // Generates a complete class with proper naming conventions
118
+ * ```
119
+ *
120
+ * @example
121
+ * ```typescript
122
+ * // API documentation generation
123
+ * const apiDoc = applyTemplates(
124
+ * `## #{endpoint.titleCase}
125
+ *
126
+ * **URL:** \`/api/#{endpoint.kebabCase}\`
127
+ * **Method:** #{method.upperCase}
128
+ * **Model:** #{model.pascalCase}
129
+ *
130
+ * Creates a new #{model.lowerCaseBreak} in the system.`,
131
+ * {
132
+ * endpoint: 'userProfiles',
133
+ * method: 'post',
134
+ * model: 'UserProfile'
135
+ * }
136
+ * );
137
+ * ```
138
+ *
139
+ * @example
140
+ * ```typescript
141
+ * // Database migration script generation
142
+ * const migration = applyTemplates(
143
+ * `CREATE TABLE #{table.snakeCase} (
144
+ * id SERIAL PRIMARY KEY,
145
+ * #{field.snakeCase} VARCHAR(255) NOT NULL,
146
+ * created_at TIMESTAMP DEFAULT NOW()
147
+ * );
148
+ *
149
+ * CREATE INDEX idx_#{table.snakeCase}_#{field.snakeCase} ON #{table.snakeCase}(#{field.snakeCase});`,
150
+ * {
151
+ * table: 'UserProfiles',
152
+ * field: 'emailAddress'
153
+ * }
154
+ * );
155
+ * ```
156
+ *
157
+ * @remarks
158
+ * - Each prefix in the prefixes object becomes a namespace in the template
159
+ * - Template tags must follow the format `#{prefix.transformationType}`
160
+ * - All transformation types available in `applyTemplate` are supported
161
+ * - If a prefixed tag is not found in the template, it's simply ignored
162
+ * - The function processes all prefixes and their transformations in the order they appear
163
+ * - Supports the same transformation types as the TemplateTag enum
164
+ * - More flexible than `applyTemplate` but with slightly more complex syntax
165
+ *
166
+ * @see {@link applyTemplate} For applying a single value to multiple transformation tags
167
+ * @see {@link TemplateTag} For the complete list of available transformation types
168
+ */
169
+ export declare function applyTemplates(str: string, prefixes: Record<string, string>): string;
@@ -0,0 +1,269 @@
1
+ "use strict";
2
+ // noinspection JSUnusedGlobalSymbols
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.applyTemplate = applyTemplate;
5
+ exports.applyTemplates = applyTemplates;
6
+ const string_utils_1 = require("./string.utils");
7
+ const enums_1 = require("../enums");
8
+ /**
9
+ * Applies a value to a template string containing transformation tags.
10
+ *
11
+ * This function replaces template tags in a string with transformed versions of a provided value.
12
+ * It's particularly useful for creating dynamic messages, error notifications, or any text
13
+ * that needs to include the same value in different formats.
14
+ *
15
+ * Each template tag is replaced with the result of applying the corresponding transformation
16
+ * function to the provided value. If a tag isn't present in the template string, that
17
+ * transformation is skipped.
18
+ *
19
+ * Available template tags:
20
+ * - `#{upperCase}` - Converts to UPPERCASE ("USER")
21
+ * - `#{snakeCase}` - Converts to snake_case ("user_profile")
22
+ * - `#{upperSnakeCase}` - Converts to UPPER_SNAKE_CASE ("USER_PROFILE")
23
+ * - `#{lowerCase}` - Converts to lowercase ("user")
24
+ * - `#{sentenceCase}` - Converts to Sentence case ("User profile")
25
+ * - `#{firstCase}` - Converts to First case ("User")
26
+ * - `#{camelCase}` - Converts to camelCase ("userProfile")
27
+ * - `#{pascalCase}` - Converts to PascalCase ("UserProfile")
28
+ * - `#{kebabCase}` - Converts to kebab-case ("user-profile")
29
+ * - `#{upperKebabCase}` - Converts to KEBAB-CASE ("USER-PROFILE")
30
+ * - `#{titleCase}` - Converts to Title Case ("User Profile")
31
+ * - `#{lowerCaseBreak}` - Breaks words and converts to lowercase ("user profile")
32
+ * - `#{upperCaseBreak}` - Breaks words and converts to UPPERCASE ("USER PROFILE")
33
+ * - `#{firstCaseBreak}` - Breaks words and applies First case ("User profile")
34
+ * - `#{singular}` - Converts plural to singular form ("users" → "user")
35
+ * - `#{number}` - Converts to a number if possible ("123" → 123)
36
+ * - `#{htmlToText}` - Removes HTML tags ("<b>User</b>" → "User")
37
+ * - `#{format}` - Formats a string with placeholders (used with additional parameters)
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * // Error message with different versions of the same term
42
+ * applyTemplate(
43
+ * 'Cannot create a #{lowerCase} with this email. #{sentenceCase} already exists.',
44
+ * 'User'
45
+ * );
46
+ * // Output: "Cannot create a user with this email. User already exists."
47
+ * ```
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * // Using multiple transformations of the same value
52
+ * applyTemplate(
53
+ * 'Model: #{pascalCase}\nTable: #{snakeCase}\nAPI Path: #{kebabCase}',
54
+ * 'blogPost'
55
+ * );
56
+ * // Output:
57
+ * // Model: BlogPost
58
+ * // Table: blog_post
59
+ * // API Path: blog-post
60
+ * ```
61
+ *
62
+ * @param {string} str - Template string containing transformation tags
63
+ * @param {string} prefix - The prefix to update with
64
+ * @returns {string} - The template with all tags replaced by transformed values
65
+ *
66
+ * @see {@link TemplateTag} For the full list of available template tags
67
+ * @see {@link applyTemplates} For applying multiple different values to a template
68
+ */
69
+ function applyTemplate(str, prefix) {
70
+ // Apply all available template tags
71
+ return str
72
+ .replace(enums_1.TemplateTag.UPPER_CASE, (0, string_utils_1.toUpperCase)(prefix))
73
+ .replace(enums_1.TemplateTag.SNAKE_CASE, (0, string_utils_1.toSnakeCase)(prefix))
74
+ .replace(enums_1.TemplateTag.UPPER_SNAKE_CASE, (0, string_utils_1.toSnakeCase)(prefix, true))
75
+ .replace(enums_1.TemplateTag.LOWER_CASE, (0, string_utils_1.toLowerCase)(prefix))
76
+ .replace(enums_1.TemplateTag.SENTENCE_CASE, (0, string_utils_1.toSentenceCase)(prefix))
77
+ .replace(enums_1.TemplateTag.FIRST_CASE, (0, string_utils_1.toFirstCase)(prefix))
78
+ .replace(enums_1.TemplateTag.CAMEL_CASE, (0, string_utils_1.toCamelCase)(prefix))
79
+ .replace(enums_1.TemplateTag.PASCAL_CASE, (0, string_utils_1.toPascalCase)(prefix))
80
+ .replace(enums_1.TemplateTag.KEBAB_CASE, (0, string_utils_1.toKebabCase)(prefix))
81
+ .replace(enums_1.TemplateTag.UPPER_KEBAB_CASE, (0, string_utils_1.toKebabCase)(prefix, true))
82
+ .replace(enums_1.TemplateTag.TITLE_CASE, (0, string_utils_1.toTitleCase)(prefix))
83
+ .replace(enums_1.TemplateTag.LOWER_CASE_BREAK, (0, string_utils_1.toLowerCaseBreak)(prefix))
84
+ .replace(enums_1.TemplateTag.UPPER_CASE_BREAK, (0, string_utils_1.toUpperCaseBreak)(prefix))
85
+ .replace(enums_1.TemplateTag.FIRST_CASE_BREAK, (0, string_utils_1.toFirstCaseBreak)(prefix))
86
+ .replace(enums_1.TemplateTag.SINGULAR, (0, string_utils_1.singular)(prefix))
87
+ .replace(enums_1.TemplateTag.NUMBER, String((0, string_utils_1.toNumber)(prefix) ?? prefix))
88
+ .replace(enums_1.TemplateTag.HTML_TO_TEXT, (0, string_utils_1.htmlToText)(prefix));
89
+ }
90
+ /**
91
+ * Applies multiple named template transformations to a string with different values for each prefix.
92
+ *
93
+ * This advanced templating function allows you to use multiple different values within a single
94
+ * template string, each with their own set of transformation tags. Unlike `applyTemplate` which
95
+ * applies one value to all tags, this function lets you specify different values for different
96
+ * prefixes, enabling complex template scenarios with multiple entities.
97
+ *
98
+ * Each prefix in the template is identified by a namespace (e.g., `user`, `post`) followed by
99
+ * a dot and the transformation tag (e.g., `#{user.lowerCase}`, `#{post.titleCase}`). This allows
100
+ * for sophisticated template generation where different parts of the text need different source
101
+ * values with various transformations applied.
102
+ *
103
+ * This is particularly useful for generating complex messages, code templates, documentation,
104
+ * or any text that involves multiple entities that need to be formatted differently within
105
+ * the same template.
106
+ *
107
+ * @param {string} str - Template string containing namespaced transformation tags in the format
108
+ * `#{prefix.transformationType}` where prefix matches keys in the prefixes object
109
+ * @param {Record<string, string>} prefixes - Object mapping prefix names to their corresponding values.
110
+ * Each key becomes a namespace in the template, and the value
111
+ * is the string that will be transformed according to the tags.
112
+ * @returns {string} The template string with all namespaced tags replaced by their transformed values
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * // Multi-entity message generation
117
+ * const message = applyTemplates(
118
+ * 'User #{user.lowerCase} created a new #{entity.sentenceCase} titled "#{title.titleCase}"',
119
+ * {
120
+ * user: 'JohnDoe',
121
+ * entity: 'blogPost',
122
+ * title: 'my first programming tutorial'
123
+ * }
124
+ * );
125
+ * // Returns: "User johndoe created a new Blog post titled "My First Programming Tutorial""
126
+ * ```
127
+ *
128
+ * @example
129
+ * ```typescript
130
+ * // Code generation with multiple entities
131
+ * const codeTemplate = applyTemplates(
132
+ * `class #{model.pascalCase} {
133
+ * constructor(private #{service.camelCase}: #{service.pascalCase}Service) {}
134
+ *
135
+ * async create#{model.pascalCase}(data: #{model.pascalCase}Data): Promise<#{model.pascalCase}> {
136
+ * return this.#{service.camelCase}.create(data);
137
+ * }
138
+ * }`,
139
+ * {
140
+ * model: 'user-profile',
141
+ * service: 'database'
142
+ * }
143
+ * );
144
+ * // Generates a complete class with proper naming conventions
145
+ * ```
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * // API documentation generation
150
+ * const apiDoc = applyTemplates(
151
+ * `## #{endpoint.titleCase}
152
+ *
153
+ * **URL:** \`/api/#{endpoint.kebabCase}\`
154
+ * **Method:** #{method.upperCase}
155
+ * **Model:** #{model.pascalCase}
156
+ *
157
+ * Creates a new #{model.lowerCaseBreak} in the system.`,
158
+ * {
159
+ * endpoint: 'userProfiles',
160
+ * method: 'post',
161
+ * model: 'UserProfile'
162
+ * }
163
+ * );
164
+ * ```
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * // Database migration script generation
169
+ * const migration = applyTemplates(
170
+ * `CREATE TABLE #{table.snakeCase} (
171
+ * id SERIAL PRIMARY KEY,
172
+ * #{field.snakeCase} VARCHAR(255) NOT NULL,
173
+ * created_at TIMESTAMP DEFAULT NOW()
174
+ * );
175
+ *
176
+ * CREATE INDEX idx_#{table.snakeCase}_#{field.snakeCase} ON #{table.snakeCase}(#{field.snakeCase});`,
177
+ * {
178
+ * table: 'UserProfiles',
179
+ * field: 'emailAddress'
180
+ * }
181
+ * );
182
+ * ```
183
+ *
184
+ * @remarks
185
+ * - Each prefix in the prefixes object becomes a namespace in the template
186
+ * - Template tags must follow the format `#{prefix.transformationType}`
187
+ * - All transformation types available in `applyTemplate` are supported
188
+ * - If a prefixed tag is not found in the template, it's simply ignored
189
+ * - The function processes all prefixes and their transformations in the order they appear
190
+ * - Supports the same transformation types as the TemplateTag enum
191
+ * - More flexible than `applyTemplate` but with slightly more complex syntax
192
+ *
193
+ * @see {@link applyTemplate} For applying a single value to multiple transformation tags
194
+ * @see {@link TemplateTag} For the complete list of available transformation types
195
+ */
196
+ function applyTemplates(str, prefixes) {
197
+ let result = str;
198
+ // Process each prefix
199
+ for (const [key, prefix] of Object.entries(prefixes)) {
200
+ // Replace all possible template tags for this prefix
201
+ // eslint-disable-next-line no-loop-func
202
+ Object.values(enums_1.TemplateTag).forEach(tag => {
203
+ // Convert #{tag} to #{prefix.tag}
204
+ const prefixedTag = tag.replace("#{", `#{${key}.`);
205
+ if (result.includes(prefixedTag)) {
206
+ // Get the transformation function name
207
+ const templateFunction = tag.replace(/#{(.+)}/, "$1");
208
+ // Apply the appropriate transformation based on the tag
209
+ let replacement = prefix;
210
+ switch (templateFunction) {
211
+ case enums_1.TemplateTag.UPPER_CASE:
212
+ replacement = (0, string_utils_1.toUpperCase)(prefix);
213
+ break;
214
+ case enums_1.TemplateTag.SNAKE_CASE:
215
+ replacement = (0, string_utils_1.toSnakeCase)(prefix);
216
+ break;
217
+ case enums_1.TemplateTag.UPPER_SNAKE_CASE:
218
+ replacement = (0, string_utils_1.toSnakeCase)(prefix, true);
219
+ break;
220
+ case enums_1.TemplateTag.LOWER_CASE:
221
+ replacement = (0, string_utils_1.toLowerCase)(prefix);
222
+ break;
223
+ case enums_1.TemplateTag.SENTENCE_CASE:
224
+ replacement = (0, string_utils_1.toSentenceCase)(prefix);
225
+ break;
226
+ case enums_1.TemplateTag.FIRST_CASE:
227
+ replacement = (0, string_utils_1.toFirstCase)(prefix);
228
+ break;
229
+ case enums_1.TemplateTag.CAMEL_CASE:
230
+ replacement = (0, string_utils_1.toCamelCase)(prefix);
231
+ break;
232
+ case enums_1.TemplateTag.PASCAL_CASE:
233
+ replacement = (0, string_utils_1.toPascalCase)(prefix);
234
+ break;
235
+ case enums_1.TemplateTag.KEBAB_CASE:
236
+ replacement = (0, string_utils_1.toKebabCase)(prefix);
237
+ break;
238
+ case enums_1.TemplateTag.UPPER_KEBAB_CASE:
239
+ replacement = (0, string_utils_1.toKebabCase)(prefix, true);
240
+ break;
241
+ case enums_1.TemplateTag.TITLE_CASE:
242
+ replacement = (0, string_utils_1.toTitleCase)(prefix);
243
+ break;
244
+ case enums_1.TemplateTag.LOWER_CASE_BREAK:
245
+ replacement = (0, string_utils_1.toLowerCaseBreak)(prefix);
246
+ break;
247
+ case enums_1.TemplateTag.UPPER_CASE_BREAK:
248
+ replacement = (0, string_utils_1.toUpperCaseBreak)(prefix);
249
+ break;
250
+ case enums_1.TemplateTag.FIRST_CASE_BREAK:
251
+ replacement = (0, string_utils_1.toFirstCaseBreak)(prefix);
252
+ break;
253
+ case enums_1.TemplateTag.SINGULAR:
254
+ replacement = (0, string_utils_1.singular)(prefix);
255
+ break;
256
+ case enums_1.TemplateTag.NUMBER:
257
+ replacement = String((0, string_utils_1.toNumber)(prefix) ?? prefix);
258
+ break;
259
+ case enums_1.TemplateTag.HTML_TO_TEXT:
260
+ replacement = (0, string_utils_1.htmlToText)(prefix);
261
+ break;
262
+ }
263
+ result = result.replace(prefixedTag, replacement);
264
+ }
265
+ });
266
+ }
267
+ return result;
268
+ }
269
+ //# sourceMappingURL=string-template.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-template.utils.js","sourceRoot":"","sources":["../../../../libs/utils/src/utils/string-template.utils.ts"],"names":[],"mappings":";AAAA,qCAAqC;;AAkFrC,sCAoBC;AA4GD,wCA4EC;AA5RD,iDAgBwB;AACxB,oCAAuC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,SAAgB,aAAa,CAAC,GAAW,EAAE,MAAc;IACrD,oCAAoC;IACpC,OAAO,GAAG;SACL,OAAO,CAAC,mBAAW,CAAC,UAA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