@vorplex/core 0.0.35 → 0.0.37

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.
@@ -6,6 +6,7 @@ export declare class $String {
6
6
  static getWords(string: string): string[];
7
7
  static camelCase(string: string): string;
8
8
  static kebabCase(string: string): string;
9
+ static titleCase(string: string): string;
9
10
  static isNullOrEmpty(value: string): boolean;
10
11
  static sanitizeForRegex(string: string): string;
11
12
  }
@@ -33,6 +33,12 @@ export class $String {
33
33
  .map((word) => word.toLowerCase())
34
34
  .join('-');
35
35
  }
36
+ static titleCase(string) {
37
+ return $String
38
+ .getWords(string.replace(/[-_]/g, ' '))
39
+ .map(word => $String.upperCaseFirst(word.toLowerCase()))
40
+ .join(' ');
41
+ }
36
42
  static isNullOrEmpty(value) {
37
43
  return value == null || value === '';
38
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorplex/core",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [