cafe-utility 10.10.0 → 10.10.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 (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1540,14 +1540,14 @@ function textToFormat(text) {
1540
1540
  text = text.normalize('NFD').replace(/[\u0300-\u036f]/g, '')
1541
1541
  let length = text.length
1542
1542
  while (true) {
1543
- text = text.replace(/(\w+)[\s,]+\w+/g, '$1')
1543
+ text = text.replace(/(\w+)[\s,']+\w+/g, '$1')
1544
1544
  if (text.length === length) {
1545
1545
  break
1546
1546
  }
1547
1547
  length = text.length
1548
1548
  }
1549
- text = text.replaceAll(/[A-Z][a-zA-Z0-9]+/g, 'A')
1550
- text = text.replaceAll(/[a-z][a-zA-Z0-9]+/g, 'a')
1549
+ text = text.replaceAll(/[A-Z][a-zA-Z0-9]*/g, 'A')
1550
+ text = text.replaceAll(/[a-z][a-zA-Z0-9]*/g, 'a')
1551
1551
  text = text.replaceAll(/[\u4E00-\u9FA5]+/g, 'Z')
1552
1552
  return text
1553
1553
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cafe-utility",
3
- "version": "10.10.0",
3
+ "version": "10.10.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "exports": {