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.
- package/.prettierignore +4 -0
- package/.prettierrc +7 -0
- package/CONTRIBUTING.md +41 -29
- package/README.md +397 -160
- package/dist/analyzing/characterCount.d.ts +19 -0
- package/dist/analyzing/characterCount.js +21 -2
- package/dist/analyzing/characterFrequency.d.ts +19 -0
- package/dist/analyzing/characterFrequency.js +22 -3
- package/dist/analyzing/complexity.d.ts +33 -0
- package/dist/analyzing/complexity.js +35 -2
- package/dist/analyzing/index.d.ts +18 -12
- package/dist/analyzing/index.js +10 -2
- package/dist/analyzing/patternCount.d.ts +10 -0
- package/dist/analyzing/patternCount.js +52 -0
- package/dist/analyzing/stringSimilarity.js +1 -1
- package/dist/analyzing/vowelConsonantCount.d.ts +22 -0
- package/dist/analyzing/vowelConsonantCount.js +38 -0
- package/dist/analyzing/wordCount.d.ts +22 -0
- package/dist/analyzing/wordCount.js +24 -2
- package/dist/formatting/capitalize.d.ts +21 -0
- package/dist/formatting/capitalize.js +22 -1
- package/dist/formatting/index.d.ts +6 -6
- package/dist/formatting/number.d.ts +23 -0
- package/dist/formatting/number.js +24 -1
- package/dist/formatting/phone.d.ts +23 -0
- package/dist/formatting/phone.js +23 -0
- package/dist/index.d.ts +9 -4
- package/dist/tests/analyzing/patternCount.test.d.ts +1 -0
- package/dist/tests/analyzing/patternCount.test.js +34 -0
- package/dist/tests/analyzing/readingDuration.test.js +12 -12
- package/dist/tests/analyzing/vowelConsonantCount.test.d.ts +1 -0
- package/dist/tests/analyzing/vowelConsonantCount.test.js +25 -0
- package/dist/tests/transformations/numberToText.test.d.ts +1 -0
- package/dist/tests/transformations/numberToText.test.js +60 -0
- package/dist/tests/transformations/splitChunks.test.d.ts +1 -0
- package/dist/tests/transformations/splitChunks.test.js +31 -0
- package/dist/tests/validations/isCoordinates.test.d.ts +1 -0
- package/dist/tests/validations/isCoordinates.test.js +18 -0
- package/dist/tests/validations/isEmail.smtpUTF8.test.d.ts +1 -0
- package/dist/tests/validations/isEmail.smtpUTF8.test.js +16 -0
- package/dist/tests/validations/isEmail.test.js +56 -6
- package/dist/tests/validations/isHexColor.test.js +21 -21
- package/dist/tests/validations/isPalindrome.test.d.ts +1 -0
- package/dist/tests/validations/isPalindrome.test.js +39 -0
- package/dist/tests/validations/isTypeOf.test.d.ts +1 -0
- package/dist/tests/validations/isTypeOf.test.js +28 -0
- package/dist/transformations/camelCase.d.ts +24 -0
- package/dist/transformations/camelCase.js +24 -0
- package/dist/transformations/capitalizeWords.d.ts +21 -0
- package/dist/transformations/capitalizeWords.js +23 -2
- package/dist/transformations/constantCase.d.ts +26 -0
- package/dist/transformations/constantCase.js +26 -0
- package/dist/transformations/escapeHTML.d.ts +23 -0
- package/dist/transformations/escapeHTML.js +24 -2
- package/dist/transformations/index.d.ts +3 -0
- package/dist/transformations/index.js +6 -2
- package/dist/transformations/initials.d.ts +27 -0
- package/dist/transformations/initials.js +38 -8
- package/dist/transformations/kebabCase.d.ts +26 -0
- package/dist/transformations/kebabCase.js +26 -0
- package/dist/transformations/maskSegment.js +4 -6
- package/dist/transformations/numberToText/helpers.d.ts +10 -0
- package/dist/transformations/numberToText/helpers.js +31 -0
- package/dist/transformations/numberToText/implementation_EN.d.ts +10 -0
- package/dist/transformations/numberToText/implementation_EN.js +45 -0
- package/dist/transformations/numberToText/implementation_PL.d.ts +10 -0
- package/dist/transformations/numberToText/implementation_PL.js +79 -0
- package/dist/transformations/numberToText/main.d.ts +19 -0
- package/dist/transformations/numberToText/main.js +67 -0
- package/dist/transformations/numberToText/types.d.ts +3 -0
- package/dist/transformations/numberToText/types.js +82 -0
- package/dist/transformations/pascalCase.d.ts +25 -0
- package/dist/transformations/pascalCase.js +25 -0
- package/dist/transformations/removeDuplicates.d.ts +21 -0
- package/dist/transformations/removeDuplicates.js +25 -4
- package/dist/transformations/removeSpecialChars.d.ts +22 -0
- package/dist/transformations/removeSpecialChars.js +26 -4
- package/dist/transformations/removeWords.d.ts +27 -0
- package/dist/transformations/removeWords.js +31 -4
- package/dist/transformations/snakeCase.d.ts +26 -0
- package/dist/transformations/snakeCase.js +26 -0
- package/dist/transformations/splitChunks.d.ts +8 -0
- package/dist/transformations/splitChunks.js +24 -0
- package/dist/transformations/titleCase.d.ts +25 -0
- package/dist/transformations/titleCase.js +25 -0
- package/dist/transformations/toSlug.d.ts +24 -0
- package/dist/transformations/toSlug.js +28 -4
- package/dist/transformations/truncateText.d.ts +25 -0
- package/dist/transformations/truncateText.js +28 -3
- package/dist/validations/index.d.ts +6 -0
- package/dist/validations/index.js +10 -2
- package/dist/validations/isCoordinates.d.ts +8 -0
- package/dist/validations/isCoordinates.js +19 -0
- package/dist/validations/isDate.d.ts +1 -1
- package/dist/validations/isDate.js +6 -8
- package/dist/validations/isEmail.d.ts +13 -1
- package/dist/validations/isEmail.js +176 -3
- package/dist/validations/isEmpty.d.ts +9 -0
- package/dist/validations/isEmpty.js +9 -0
- package/dist/validations/isHexColor.js +1 -1
- package/dist/validations/isIPv4.d.ts +21 -0
- package/dist/validations/isIPv4.js +22 -2
- package/dist/validations/isPalindrome.d.ts +10 -0
- package/dist/validations/isPalindrome.js +21 -0
- package/dist/validations/isSlug.d.ts +27 -0
- package/dist/validations/isSlug.js +27 -0
- package/dist/validations/isTypeOf.d.ts +9 -0
- package/dist/validations/isTypeOf.js +30 -0
- package/dist/validations/isURL.d.ts +21 -0
- package/dist/validations/isURL.js +21 -0
- package/package.json +5 -3
package/.prettierignore
ADDED
package/.prettierrc
ADDED
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
34
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
git push origin feature/amazing-feature
|
|
86
|
+
```
|
|
76
87
|
|
|
77
88
|
4. Create a pull request with:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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.
|