Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pedsmoreira committed Jan 13, 2024
1 parent d6324d5 commit 4dd637d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Casex is a function that applies a case style given a pattern.

Instead of having a specific function for each case style, I provide a self-expressive pattern that represent the desired output. For example, kebab-case can be represented as `ca-se` and title case as `Ca Se`.

[Demo](https://codesandbox.io/s/8y83k797v0)

## Install

```sh
Expand Down Expand Up @@ -44,7 +42,7 @@ Let's take for example `i_am the-real JohnDoe`:
The default will likely work for most of your cases, but if you wish, you can provide custom delimiters:

```js
casex('foo.bar,baz', 'Ca Se', '.,'); // Foo Bar Baz
casex({ text: 'foo.bar,baz', pattern: 'Ca Se', '.,' }); // Foo Bar Baz
```

_Note: The default delimiters are: `A-Z\\s_-`.
Expand All @@ -59,9 +57,7 @@ Let's take for example `Ca_se`:
* `s`: first letter of the second and subsequent words
* `e`: second and subsequent letters of the second and subsequent words

Confusing? Check out the [demo](https://codesandbox.io/s/8y83k797v0) and/or examples below. I'm sure you'll get the hang of it :)

_Note: You could use any other letters to describe, such as `aa$aa` or `na_me`. What matters is that it takes the first two and last two letters for checking capitalization and whatever is in the middle is "glue"._
_Note: You can use any other letters to describe, such as `aa$aa` or `na_me`. What matters is that it takes the first two and last two letters for checking capitalization and whatever is in the middle is "glue"._

#### 2.1 Special transformations

Expand Down

0 comments on commit 4dd637d

Please sign in to comment.