stringzy 3.0.0 → 4.0.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 (111) hide show
  1. package/.prettierignore +4 -0
  2. package/.prettierrc +7 -0
  3. package/CONTRIBUTING.md +41 -29
  4. package/README.md +397 -160
  5. package/dist/analyzing/characterCount.d.ts +19 -0
  6. package/dist/analyzing/characterCount.js +21 -2
  7. package/dist/analyzing/characterFrequency.d.ts +19 -0
  8. package/dist/analyzing/characterFrequency.js +22 -3
  9. package/dist/analyzing/complexity.d.ts +33 -0
  10. package/dist/analyzing/complexity.js +35 -2
  11. package/dist/analyzing/index.d.ts +18 -12
  12. package/dist/analyzing/index.js +10 -2
  13. package/dist/analyzing/patternCount.d.ts +10 -0
  14. package/dist/analyzing/patternCount.js +52 -0
  15. package/dist/analyzing/stringSimilarity.js +1 -1
  16. package/dist/analyzing/vowelConsonantCount.d.ts +22 -0
  17. package/dist/analyzing/vowelConsonantCount.js +38 -0
  18. package/dist/analyzing/wordCount.d.ts +22 -0
  19. package/dist/analyzing/wordCount.js +24 -2
  20. package/dist/formatting/capitalize.d.ts +21 -0
  21. package/dist/formatting/capitalize.js +22 -1
  22. package/dist/formatting/index.d.ts +6 -6
  23. package/dist/formatting/number.d.ts +23 -0
  24. package/dist/formatting/number.js +24 -1
  25. package/dist/formatting/phone.d.ts +23 -0
  26. package/dist/formatting/phone.js +23 -0
  27. package/dist/index.d.ts +9 -4
  28. package/dist/tests/analyzing/patternCount.test.d.ts +1 -0
  29. package/dist/tests/analyzing/patternCount.test.js +34 -0
  30. package/dist/tests/analyzing/readingDuration.test.js +12 -12
  31. package/dist/tests/analyzing/vowelConsonantCount.test.d.ts +1 -0
  32. package/dist/tests/analyzing/vowelConsonantCount.test.js +25 -0
  33. package/dist/tests/transformations/numberToText.test.d.ts +1 -0
  34. package/dist/tests/transformations/numberToText.test.js +60 -0
  35. package/dist/tests/transformations/splitChunks.test.d.ts +1 -0
  36. package/dist/tests/transformations/splitChunks.test.js +31 -0
  37. package/dist/tests/validations/isCoordinates.test.d.ts +1 -0
  38. package/dist/tests/validations/isCoordinates.test.js +18 -0
  39. package/dist/tests/validations/isEmail.smtpUTF8.test.d.ts +1 -0
  40. package/dist/tests/validations/isEmail.smtpUTF8.test.js +16 -0
  41. package/dist/tests/validations/isEmail.test.js +56 -6
  42. package/dist/tests/validations/isHexColor.test.js +21 -21
  43. package/dist/tests/validations/isPalindrome.test.d.ts +1 -0
  44. package/dist/tests/validations/isPalindrome.test.js +39 -0
  45. package/dist/tests/validations/isTypeOf.test.d.ts +1 -0
  46. package/dist/tests/validations/isTypeOf.test.js +28 -0
  47. package/dist/transformations/camelCase.d.ts +24 -0
  48. package/dist/transformations/camelCase.js +24 -0
  49. package/dist/transformations/capitalizeWords.d.ts +21 -0
  50. package/dist/transformations/capitalizeWords.js +23 -2
  51. package/dist/transformations/constantCase.d.ts +26 -0
  52. package/dist/transformations/constantCase.js +26 -0
  53. package/dist/transformations/escapeHTML.d.ts +23 -0
  54. package/dist/transformations/escapeHTML.js +24 -2
  55. package/dist/transformations/index.d.ts +3 -0
  56. package/dist/transformations/index.js +6 -2
  57. package/dist/transformations/initials.d.ts +27 -0
  58. package/dist/transformations/initials.js +38 -8
  59. package/dist/transformations/kebabCase.d.ts +26 -0
  60. package/dist/transformations/kebabCase.js +26 -0
  61. package/dist/transformations/maskSegment.js +4 -6
  62. package/dist/transformations/numberToText/helpers.d.ts +10 -0
  63. package/dist/transformations/numberToText/helpers.js +31 -0
  64. package/dist/transformations/numberToText/implementation_EN.d.ts +10 -0
  65. package/dist/transformations/numberToText/implementation_EN.js +45 -0
  66. package/dist/transformations/numberToText/implementation_PL.d.ts +10 -0
  67. package/dist/transformations/numberToText/implementation_PL.js +79 -0
  68. package/dist/transformations/numberToText/main.d.ts +19 -0
  69. package/dist/transformations/numberToText/main.js +67 -0
  70. package/dist/transformations/numberToText/types.d.ts +3 -0
  71. package/dist/transformations/numberToText/types.js +82 -0
  72. package/dist/transformations/pascalCase.d.ts +25 -0
  73. package/dist/transformations/pascalCase.js +25 -0
  74. package/dist/transformations/removeDuplicates.d.ts +21 -0
  75. package/dist/transformations/removeDuplicates.js +25 -4
  76. package/dist/transformations/removeSpecialChars.d.ts +22 -0
  77. package/dist/transformations/removeSpecialChars.js +26 -4
  78. package/dist/transformations/removeWords.d.ts +27 -0
  79. package/dist/transformations/removeWords.js +31 -4
  80. package/dist/transformations/snakeCase.d.ts +26 -0
  81. package/dist/transformations/snakeCase.js +26 -0
  82. package/dist/transformations/splitChunks.d.ts +8 -0
  83. package/dist/transformations/splitChunks.js +24 -0
  84. package/dist/transformations/titleCase.d.ts +25 -0
  85. package/dist/transformations/titleCase.js +25 -0
  86. package/dist/transformations/toSlug.d.ts +24 -0
  87. package/dist/transformations/toSlug.js +28 -4
  88. package/dist/transformations/truncateText.d.ts +25 -0
  89. package/dist/transformations/truncateText.js +28 -3
  90. package/dist/validations/index.d.ts +6 -0
  91. package/dist/validations/index.js +10 -2
  92. package/dist/validations/isCoordinates.d.ts +8 -0
  93. package/dist/validations/isCoordinates.js +19 -0
  94. package/dist/validations/isDate.d.ts +1 -1
  95. package/dist/validations/isDate.js +6 -8
  96. package/dist/validations/isEmail.d.ts +13 -1
  97. package/dist/validations/isEmail.js +176 -3
  98. package/dist/validations/isEmpty.d.ts +9 -0
  99. package/dist/validations/isEmpty.js +9 -0
  100. package/dist/validations/isHexColor.js +1 -1
  101. package/dist/validations/isIPv4.d.ts +21 -0
  102. package/dist/validations/isIPv4.js +22 -2
  103. package/dist/validations/isPalindrome.d.ts +10 -0
  104. package/dist/validations/isPalindrome.js +21 -0
  105. package/dist/validations/isSlug.d.ts +27 -0
  106. package/dist/validations/isSlug.js +27 -0
  107. package/dist/validations/isTypeOf.d.ts +9 -0
  108. package/dist/validations/isTypeOf.js +30 -0
  109. package/dist/validations/isURL.d.ts +21 -0
  110. package/dist/validations/isURL.js +21 -0
  111. package/package.json +5 -3
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ dist
3
+ assets
4
+ .github
package/.prettierrc ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "trailingComma": "es5",
5
+ "printWidth": 100,
6
+ "tabWidth": 2
7
+ }
package/CONTRIBUTING.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # Contributing to Stringzy
2
+
2
3
  Thanks for your interest in contributing to Stringzy! This document provides guidelines and instructions for contributing to the project.
3
4
 
4
5
  ## What We're Looking For
6
+
5
7
  - **Bug fixes** - Help us solve issues
6
8
  - **New string functions** - Add useful string manipulation methods
7
9
  - **Documentation** - Improve examples and guides
@@ -10,29 +12,32 @@ Thanks for your interest in contributing to Stringzy! This document provides gui
10
12
  ## Development Guide
11
13
 
12
14
  ### Setup
15
+
13
16
  1. Fork the repository
14
17
  2. Clone your fork:
15
- _Remember to replace `YOUR-USERNAME` with your actual GitHub username._
16
- ```bash
17
- git clone https://github.com/YOUR-USERNAME/stringzy.git
18
- ```
18
+ _Remember to replace `YOUR-USERNAME` with your actual GitHub username._
19
+
20
+ ```bash
21
+ git clone https://github.com/YOUR-USERNAME/stringzy.git
22
+ ```
19
23
 
20
24
  3. Navigate to the project directory:
21
- ```bash
22
- cd stringzy
23
- ```
24
25
 
25
- 4. Install dependencies:
26
- ```bash
27
- npm install
28
- ```
26
+ ```bash
27
+ cd stringzy
28
+ ```
29
29
 
30
+ 4. Install dependencies:
31
+ ```bash
32
+ npm install
33
+ ```
30
34
 
31
35
  ### Making Changes
36
+
32
37
  - Create a new branch:
33
- ```bash
34
- git checkout -b feature/amazing-feature
35
- ```
38
+ ```bash
39
+ git checkout -b feature/amazing-feature
40
+ ```
36
41
  - Make your changes
37
42
  - Write tests for new functions
38
43
  - Keep functions simple and focused
@@ -40,12 +45,14 @@ Thanks for your interest in contributing to Stringzy! This document provides gui
40
45
  - Update README if adding new functions
41
46
 
42
47
  ### Code Style
48
+
43
49
  - Use 2 spaces for indentation
44
50
  - Add JSDoc comments for new functions
45
51
  - Handle edge cases (null, undefined, empty strings)
46
52
  - Use descriptive function names
47
53
 
48
54
  Example:
55
+
49
56
  ```ts
50
57
  /**
51
58
  * Converts string to kebab-case
@@ -59,29 +66,34 @@ function toKebabCase(str: string): string {
59
66
  ```
60
67
 
61
68
  ## Submitting Changes
62
- 1. Make sure tests pass:
63
- ```bash
64
- npm test
65
- ```
66
69
 
67
- 2. Commit your changes:
68
- ```bash
69
- git commit -m "feat: add some amazing feature"
70
- ```
70
+ 1. Make sure tests pass:
71
+
72
+ ```bash
73
+ npm test
74
+ ```
75
+
76
+ 2. Commit your changes:
77
+
78
+ ```bash
79
+ git commit -m "feat: add some amazing feature"
80
+ ```
71
81
 
72
82
  3. Push to the branch
73
- ```bash
74
- git push origin feature/amazing-feature
75
- ```
83
+
84
+ ```bash
85
+ git push origin feature/amazing-feature
86
+ ```
76
87
 
77
88
  4. Create a pull request with:
78
- - Clear description of changes
79
- - Why the change is needed
80
- - Any breaking changes
89
+ - Clear description of changes
90
+ - Why the change is needed
91
+ - Any breaking changes
81
92
 
82
93
  ## Questions?
94
+
83
95
  If you have any questions or need help, feel free to open an issue. We're happy to help!
84
96
 
85
97
  ---
86
98
 
87
- By contributing, you agree to license your work under the same license as this project.
99
+ By contributing, you agree to license your work under the same license as this project.