@memberjunction/global 2.17.0 → 2.18.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/util.d.ts CHANGED
@@ -36,4 +36,87 @@ export declare function SafeJSONParse<T>(jsonString: string, logErrors?: boolean
36
36
  * @returns
37
37
  */
38
38
  export declare function ConvertMarkdownStringToHtmlList(htmlListType: 'Ordered' | 'Unordered', text: string): string;
39
+ /**
40
+ * Converts a string that uses camel casing or contains consecutive uppercase letters to have spaces between words.
41
+ * For example:
42
+ * "DatabaseVersion" -> "Database Version"
43
+ * "AIAgentLearningCycle" -> "AI Agent Learning Cycle"
44
+ */
45
+ export declare function convertCamelCaseToHaveSpaces(s: string): string;
46
+ /**
47
+ * Removes all whitespace characters (spaces, tabs, newlines) from a given string.
48
+ *
49
+ * @param s - The input string from which to remove whitespace.
50
+ * @returns A new string with all whitespace characters removed.
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * stripWhitespace(" Hello World "); // "HelloWorld"
55
+ * stripWhitespace("\tExample\nString "); // "ExampleString"
56
+ * stripWhitespace(""); // ""
57
+ * ```
58
+ */
59
+ export declare function stripWhitespace(s: string): string;
60
+ /**
61
+ * Retrieves the plural form of a word if it is an irregular plural.
62
+ *
63
+ * @param singularName - The singular form of the word to check.
64
+ * @returns The irregular plural form if found, or `null` if not found.
65
+ *
66
+ * @example
67
+ * ```typescript
68
+ * getIrregularPlural('child'); // returns 'children'
69
+ * getIrregularPlural('dog'); // returns null
70
+ * ```
71
+ */
72
+ export declare function getIrregularPlural(singularName: string): string | null;
73
+ /**
74
+ * Converts a singular word to its plural form, handling common pluralization rules
75
+ * and irregular plurals.
76
+ *
77
+ * @param singularName - The singular form of the word to pluralize.
78
+ * @returns The plural form of the word.
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ * generatePluralName('child'); // returns 'children'
83
+ * generatePluralName('box'); // returns 'boxes'
84
+ * generatePluralName('party'); // returns 'parties'
85
+ * generatePluralName('dog'); // returns 'dogs'
86
+ * ```
87
+ */
88
+ export declare function generatePluralName(singularName: string): string;
89
+ /**
90
+ * Removes trailing characters from a string if they match the specified substring.
91
+ *
92
+ * @param s - The input string from which trailing characters should be stripped.
93
+ * @param charsToStrip - The substring to remove if it appears at the end of the input string.
94
+ * @param skipIfExactMatch - If `true`, does not strip the trailing characters when the string is exactly equal to `charsToStrip`.
95
+ * @returns The modified string with trailing characters stripped, or the original string if no match is found.
96
+ *
97
+ * @example
98
+ * ```typescript
99
+ * stripTrailingChars("example.txt", ".txt", false); // "example"
100
+ * stripTrailingChars("example.txt", ".txt", true); // "example"
101
+ * stripTrailingChars("file.txt", "txt", false); // "file.txt" (no match)
102
+ * stripTrailingChars(".txt", ".txt", true); // ".txt" (exact match, not stripped)
103
+ * ```
104
+ */
105
+ export declare function stripTrailingChars(s: string, charsToStrip: string, skipIfExactMatch: boolean): string;
106
+ /**
107
+ * Recursively removes all spaces from a given string.
108
+ *
109
+ * @param s - The input string from which to remove all spaces.
110
+ * @returns A new string with all spaces removed.
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * replaceAllSpaces("Hello World"); // "HelloWorld"
115
+ * replaceAllSpaces(" Leading spaces"); // "Leadingspaces"
116
+ * replaceAllSpaces("Trailing spaces "); // "Trailingspaces"
117
+ * replaceAllSpaces("NoSpacesHere"); // "NoSpacesHere"
118
+ * replaceAllSpaces(""); // ""
119
+ * ```
120
+ */
121
+ export declare function replaceAllSpaces(s: string): string;
39
122
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,oBAAoB,sBA4BnC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAiB3E;AAGD;;;;;GAKG;AACH,wBAAgB,SA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,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA2BtE;AAGD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CA0B/D;AAKD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAerG;AAGD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAalD"}
package/dist/util.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConvertMarkdownStringToHtmlList = exports.SafeJSONParse = exports.CleanJavaScript = exports.CleanJSON = exports.CopyScalarsAndArrays = exports.GetGlobalObjectStore = void 0;
3
+ exports.replaceAllSpaces = exports.stripTrailingChars = exports.generatePluralName = exports.getIrregularPlural = exports.stripWhitespace = exports.convertCamelCaseToHaveSpaces = exports.ConvertMarkdownStringToHtmlList = exports.SafeJSONParse = exports.CleanJavaScript = exports.CleanJSON = exports.CopyScalarsAndArrays = exports.GetGlobalObjectStore = void 0;
4
4
  /**
5
5
  * The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared
6
6
  * because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.
@@ -175,4 +175,184 @@ function ConvertMarkdownStringToHtmlList(htmlListType, text) {
175
175
  }
176
176
  }
177
177
  exports.ConvertMarkdownStringToHtmlList = ConvertMarkdownStringToHtmlList;
178
+ /**
179
+ * Converts a string that uses camel casing or contains consecutive uppercase letters to have spaces between words.
180
+ * For example:
181
+ * "DatabaseVersion" -> "Database Version"
182
+ * "AIAgentLearningCycle" -> "AI Agent Learning Cycle"
183
+ */
184
+ function convertCamelCaseToHaveSpaces(s) {
185
+ let result = '';
186
+ for (let i = 0; i < s.length; ++i) {
187
+ if (i > 0 && // Not the first character
188
+ ((s[i] === s[i].toUpperCase() && s[i - 1] !== s[i - 1].toUpperCase()) || // Transition from lowercase to uppercase
189
+ (s[i] === s[i].toUpperCase() && s[i - 1] === s[i - 1].toUpperCase() && // Transition within consecutive uppercase letters
190
+ i + 1 < s.length && s[i + 1] !== s[i + 1].toUpperCase())) // Followed by a lowercase
191
+ ) {
192
+ result += ' ';
193
+ }
194
+ result += s[i];
195
+ }
196
+ return result;
197
+ }
198
+ exports.convertCamelCaseToHaveSpaces = convertCamelCaseToHaveSpaces;
199
+ /**
200
+ * Removes all whitespace characters (spaces, tabs, newlines) from a given string.
201
+ *
202
+ * @param s - The input string from which to remove whitespace.
203
+ * @returns A new string with all whitespace characters removed.
204
+ *
205
+ * @example
206
+ * ```typescript
207
+ * stripWhitespace(" Hello World "); // "HelloWorld"
208
+ * stripWhitespace("\tExample\nString "); // "ExampleString"
209
+ * stripWhitespace(""); // ""
210
+ * ```
211
+ */
212
+ function stripWhitespace(s) {
213
+ if (!s) {
214
+ // Return the original string if it is null, undefined, or empty
215
+ return s;
216
+ }
217
+ return s.replace(/\s+/g, ''); // Use \s+ for efficiency in case of consecutive whitespace
218
+ }
219
+ exports.stripWhitespace = stripWhitespace;
220
+ /**
221
+ * Retrieves the plural form of a word if it is an irregular plural.
222
+ *
223
+ * @param singularName - The singular form of the word to check.
224
+ * @returns The irregular plural form if found, or `null` if not found.
225
+ *
226
+ * @example
227
+ * ```typescript
228
+ * getIrregularPlural('child'); // returns 'children'
229
+ * getIrregularPlural('dog'); // returns null
230
+ * ```
231
+ */
232
+ function getIrregularPlural(singularName) {
233
+ const irregularPlurals = {
234
+ child: 'children',
235
+ person: 'people',
236
+ mouse: 'mice',
237
+ foot: 'feet',
238
+ tooth: 'teeth',
239
+ goose: 'geese',
240
+ man: 'men',
241
+ woman: 'women',
242
+ ox: 'oxen',
243
+ cactus: 'cacti',
244
+ focus: 'foci',
245
+ fungus: 'fungi',
246
+ nucleus: 'nuclei',
247
+ syllabus: 'syllabi',
248
+ analysis: 'analyses',
249
+ diagnosis: 'diagnoses',
250
+ thesis: 'theses',
251
+ crisis: 'crises',
252
+ phenomenon: 'phenomena',
253
+ criterion: 'criteria',
254
+ datum: 'data',
255
+ };
256
+ const lowerSingular = singularName.toLowerCase();
257
+ return irregularPlurals[lowerSingular] || null;
258
+ }
259
+ exports.getIrregularPlural = getIrregularPlural;
260
+ /**
261
+ * Converts a singular word to its plural form, handling common pluralization rules
262
+ * and irregular plurals.
263
+ *
264
+ * @param singularName - The singular form of the word to pluralize.
265
+ * @returns The plural form of the word.
266
+ *
267
+ * @example
268
+ * ```typescript
269
+ * generatePluralName('child'); // returns 'children'
270
+ * generatePluralName('box'); // returns 'boxes'
271
+ * generatePluralName('party'); // returns 'parties'
272
+ * generatePluralName('dog'); // returns 'dogs'
273
+ * ```
274
+ */
275
+ function generatePluralName(singularName) {
276
+ // Check for irregular plurals
277
+ const irregularPlural = getIrregularPlural(singularName);
278
+ if (irregularPlural) {
279
+ return irregularPlural;
280
+ }
281
+ // Handle common pluralization rules
282
+ if (singularName.endsWith('y') && singularName.length > 1) {
283
+ const secondLastChar = singularName[singularName.length - 2].toLowerCase();
284
+ if ('aeiou'.includes(secondLastChar)) {
285
+ // Ends with a vowel + y, just add 's'
286
+ return singularName + 's';
287
+ }
288
+ else {
289
+ // Ends with a consonant + y, replace 'y' with 'ies'
290
+ return singularName.slice(0, -1) + 'ies';
291
+ }
292
+ }
293
+ if (/(s|ch|sh|x|z)$/.test(singularName)) {
294
+ // Ends with 's', 'ch', 'sh', 'x', or 'z', add 'es'
295
+ return singularName + 'es';
296
+ }
297
+ // Default case: Add 's' to the singular name
298
+ return singularName + 's';
299
+ }
300
+ exports.generatePluralName = generatePluralName;
301
+ /**
302
+ * Removes trailing characters from a string if they match the specified substring.
303
+ *
304
+ * @param s - The input string from which trailing characters should be stripped.
305
+ * @param charsToStrip - The substring to remove if it appears at the end of the input string.
306
+ * @param skipIfExactMatch - If `true`, does not strip the trailing characters when the string is exactly equal to `charsToStrip`.
307
+ * @returns The modified string with trailing characters stripped, or the original string if no match is found.
308
+ *
309
+ * @example
310
+ * ```typescript
311
+ * stripTrailingChars("example.txt", ".txt", false); // "example"
312
+ * stripTrailingChars("example.txt", ".txt", true); // "example"
313
+ * stripTrailingChars("file.txt", "txt", false); // "file.txt" (no match)
314
+ * stripTrailingChars(".txt", ".txt", true); // ".txt" (exact match, not stripped)
315
+ * ```
316
+ */
317
+ function stripTrailingChars(s, charsToStrip, skipIfExactMatch) {
318
+ if (!s || !charsToStrip) {
319
+ // Return the original string if either input is empty
320
+ return s;
321
+ }
322
+ const shouldStrip = s.endsWith(charsToStrip) &&
323
+ (!skipIfExactMatch || s !== charsToStrip);
324
+ if (shouldStrip) {
325
+ return s.substring(0, s.length - charsToStrip.length);
326
+ }
327
+ return s;
328
+ }
329
+ exports.stripTrailingChars = stripTrailingChars;
330
+ /**
331
+ * Recursively removes all spaces from a given string.
332
+ *
333
+ * @param s - The input string from which to remove all spaces.
334
+ * @returns A new string with all spaces removed.
335
+ *
336
+ * @example
337
+ * ```typescript
338
+ * replaceAllSpaces("Hello World"); // "HelloWorld"
339
+ * replaceAllSpaces(" Leading spaces"); // "Leadingspaces"
340
+ * replaceAllSpaces("Trailing spaces "); // "Trailingspaces"
341
+ * replaceAllSpaces("NoSpacesHere"); // "NoSpacesHere"
342
+ * replaceAllSpaces(""); // ""
343
+ * ```
344
+ */
345
+ function replaceAllSpaces(s) {
346
+ if (!s) {
347
+ // Handle null, undefined, or empty string cases
348
+ return s;
349
+ }
350
+ if (s.includes(' ')) {
351
+ // Recursive case: Replace a single space and call the function again
352
+ return replaceAllSpaces(s.replace(' ', ''));
353
+ }
354
+ // Base case: No spaces left to replace
355
+ return s;
356
+ }
357
+ exports.replaceAllSpaces = replaceAllSpaces;
178
358
  //# sourceMappingURL=util.js.map
package/dist/util.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,oBAAoB;IAChC,IAAO,CAAC;QACJ,gGAAgG;QAChG,IAAI,MAAM;YACN,OAAO,MAAM,CAAC;aACb,CAAC;YACF,8FAA8F;YAC9F,sHAAsH;YACtH,IAAI,MAAM;gBACN,OAAO,MAAM,CAAC;;gBAEd,OAAO,IAAI,CAAC,CAAC,sHAAsH;QAC3I,CAAC;IACL,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACP,IAAI,CAAC;YACD,6FAA6F;YAC7F,IAAI,MAAM;gBACN,OAAO,MAAM,CAAC;;gBAEd,OAAO,IAAI,CAAC,CAAC,sHAAsH;QAC3I,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACP,4IAA4I;YAC5I,uGAAuG;YACvG,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;AACL,CAAC;AA5BD,oDA4BC;AAED;;;;GAIG;AACH,SAAgB,oBAAoB,CAAmB,KAAQ;IAC3D,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,GAAc,CAAC,CAAC;QACpC,0CAA0C;QAC1C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9C,MAAM,CAAC,GAAc,CAAC,GAAG,KAAK,CAAC;QACnC,CAAC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,+DAA+D;YAC/D,MAAM,CAAC,GAAc,CAAC,GAAG,CAAC,GAAG,KAAK,CAAQ,CAAC;QAC/C,CAAC;a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AI,CAAC,CAAC,EAAE,CAAC;QACL,gDAAgD;QAChD,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,qEAAqE;QACrE,OAAO,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,uCAAuC;IACvC,OAAO,CAAC,CAAC;AACb,CAAC;AAbD,4CAaC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/global",
3
- "version": "2.17.0",
3
+ "version": "2.18.1",
4
4
  "description": "MemberJunction: Global Object - Needed for ALL other MJ components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",