cafe-utility 1.37.0 → 1.38.0

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 (2) hide show
  1. package/index.js +4 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -699,6 +699,8 @@ const slugify = string =>
699
699
 
700
700
  const camelToTitle = string => capitalize(string.replace(/([A-Z])/g, ' $1'))
701
701
 
702
+ const slugToTitle = string => string.split('-').map(capitalize).join(' ')
703
+
702
704
  const surroundInOut = (string, filler) => filler + string.split('').join(filler) + filler
703
705
 
704
706
  const enumify = string => slugify(string).replace(/-/g, '_').toUpperCase()
@@ -1504,7 +1506,8 @@ module.exports = {
1504
1506
  getBasename,
1505
1507
  normalizeFilename,
1506
1508
  parseFilename,
1507
- camelToTitle
1509
+ camelToTitle,
1510
+ slugToTitle
1508
1511
  },
1509
1512
  Assertions: {
1510
1513
  asTrue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cafe-utility",
3
- "version": "1.37.0",
3
+ "version": "1.38.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "exports": {