Skip to content

Commit 42e5085

Browse files
Reshape the README into the module landing page the standard describes
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent ed899af commit 42e5085

1 file changed

Lines changed: 22 additions & 78 deletions

File tree

README.md

Lines changed: 22 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,59 @@
11
# CasingStyle
22

3-
The `CasingStyle` PowerShell module provides functions for detecting, converting, and splitting different casing styles in strings. This can be
4-
useful for text transformations, standardizing variable names, and ensuring consistent formatting in scripts.
3+
`CasingStyle` is a PowerShell module that detects, converts, and splits the casing style of text. Use it to normalize variable names, translate
4+
identifiers between conventions, and keep generated output consistently formatted.
55

6-
## Prerequisites
7-
8-
This module does not require additional dependencies, but it integrates well with the [PSModule framework](https://github.com/PSModule) for building,
9-
testing, and publishing PowerShell modules.
6+
It recognizes `lowercase`, `UPPERCASE`, `Sentencecase`, `Title Case`, `PascalCase`, `camelCase`, `kebab-case`, `UPPER-KEBAB-CASE`, `snake_case`, and
7+
`UPPER_SNAKE_CASE`, and needs nothing beyond PowerShell itself.
108

119
## Installation
1210

13-
To install the module from the PowerShell Gallery, you can use the following command:
11+
Install the module from the PowerShell Gallery:
1412

1513
```powershell
1614
Install-PSResource -Name CasingStyle
1715
Import-Module -Name CasingStyle
1816
```
1917

20-
## Usage
21-
22-
The following examples demonstrate common use cases for the module, showing how it can be applied to detect, convert, and manipulate different casing
23-
styles in strings.
24-
25-
### Example 1: Convert a string to a different casing style
26-
27-
```powershell
28-
'thisIsCamelCase' | ConvertTo-CasingStyle -To 'snake_case'
29-
# Output: this_is_camel_case
30-
```
18+
## Capabilities
3119

32-
```powershell
33-
'thisIsCamelCase' | ConvertTo-CasingStyle -To 'UPPER_SNAKE_CASE'
34-
# Output: THIS_IS_CAMEL_CASE
35-
```
20+
Detect the casing style of a string:
3621

3722
```powershell
38-
'thisIsCamelCase' | ConvertTo-CasingStyle -To 'kebab-case'
39-
# Output: this-is-camel-case
23+
'testTestTest' | Get-CasingStyle
24+
# camelCase
4025
```
4126

42-
### Example 2: Detect the casing style of a string
27+
Convert a string to another casing style, whichever style it starts in:
4328

4429
```powershell
45-
'testTestTest' | Get-CasingStyle
46-
# Output: camelCase
47-
```
30+
'thisIsCamelCase' | ConvertTo-CasingStyle -To 'snake_case'
31+
# this_is_camel_case
4832
49-
```powershell
50-
'TestTestTest' | Get-CasingStyle
51-
# Output: PascalCase
33+
'this-is-kebab-case' | ConvertTo-CasingStyle -To 'PascalCase'
34+
# ThisIsKebabCase
5235
```
5336

54-
### Example 3: Split a string based on casing style
37+
Split a string into the words its casing encodes, chaining styles when the text mixes several:
5538

5639
```powershell
57-
Split-CasingStyle -Text 'this-is-a-kebab-case-string' -By 'kebab-case'
58-
# Output:
40+
'this_is_a-PascalString' | Split-CasingStyle -By 'snake_case', 'kebab-case', 'PascalCase'
5941
# this
6042
# is
6143
# a
62-
# kebab
63-
# case
64-
# string
65-
```
66-
67-
```powershell
68-
Split-CasingStyle -Text 'ThisIsAPascalCaseString' -By 'PascalCase'
69-
# Output:
70-
# This
71-
# Is
72-
# A
7344
# Pascal
74-
# Case
7545
# String
7646
```
7747

78-
### Find more examples
79-
80-
To find more examples of how to use the module, please refer to the [examples](examples) folder.
48+
More end-to-end scenarios live in the [examples](examples) folder.
8149

82-
Alternatively, you can use the following PowerShell commands:
50+
## Documentation
8351

84-
```powershell
85-
Get-Command -Module 'CasingStyle'
86-
```
52+
Documentation is published at [psmodule.io/CasingStyle](https://psmodule.io/CasingStyle/).
8753

88-
To find examples of each of the commands, you can use:
54+
Use PowerShell help and command discovery for module details:
8955

9056
```powershell
91-
Get-Help ConvertTo-CasingStyle -Examples
57+
Get-Command -Module CasingStyle
58+
Get-Help -Name ConvertTo-CasingStyle -Examples
9259
```
93-
94-
## Documentation
95-
96-
For further documentation, please visit the official documentation pages for each function:
97-
98-
- [ConvertTo-CasingStyle](https://psmodule.io/CasingStyle/Functions/ConvertTo-CasingStyle/)
99-
- [Get-CasingStyle](https://psmodule.io/CasingStyle/Functions/Get-CasingStyle/)
100-
- [Split-CasingStyle](https://psmodule.io/CasingStyle/Functions/Split-CasingStyle/)
101-
102-
## Contributing
103-
104-
Regardless of your experience level, your contributions are valuable! Whether you're a beginner or an expert, you can help improve this project by
105-
sharing feedback, reporting issues, or contributing code.
106-
107-
### For Users
108-
109-
If you encounter unexpected behavior, errors, or missing functionality, you can help by submitting bug reports and feature requests.
110-
Please see the issues tab on this project and submit a new issue that describes your experience.
111-
112-
### For Developers
113-
114-
If you write code, we'd love to have your contributions! Please read the [Contribution guidelines](CONTRIBUTING.md) for more information.
115-
You can either help by picking up an existing issue or submit a new one if you have an idea for a new feature or improvement.

0 commit comments

Comments
 (0)