dce-reactkit 3.7.34 → 3.7.35

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/cjs/index.js CHANGED
@@ -15764,6 +15764,23 @@ const someAsync = (array, operatorFunction) => __awaiter(void 0, void 0, void 0,
15764
15764
  return false;
15765
15765
  });
15766
15766
 
15767
+ /**
15768
+ * Capitalize every word in a string (just the first letter)
15769
+ * @param str string to capitalize
15770
+ * @returns string with every word capitalized
15771
+ */
15772
+ const capitalize = (str) => {
15773
+ return (str
15774
+ // Split into words
15775
+ .split(' ')
15776
+ // Capitalize first letter of each word
15777
+ .map((word) => {
15778
+ return word.charAt(0).toUpperCase() + word.substring(1);
15779
+ })
15780
+ // Join back together
15781
+ .join(' '));
15782
+ };
15783
+
15767
15784
  /**
15768
15785
  * Days of the week
15769
15786
  * @author Gabe Abrams
@@ -15826,6 +15843,7 @@ exports.addFatalErrorHandler = addFatalErrorHandler;
15826
15843
  exports.alert = alert;
15827
15844
  exports.avg = avg;
15828
15845
  exports.canReviewLogs = canReviewLogs;
15846
+ exports.capitalize = capitalize;
15829
15847
  exports.ceilToNumDecimals = ceilToNumDecimals;
15830
15848
  exports.combineClassNames = combineClassNames;
15831
15849
  exports.compareArraysByProp = compareArraysByProp;