-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc90385
commit 466ea15
Showing
6 changed files
with
42 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"titleizejs": minor | ||
--- | ||
|
||
Allow custom separator for slugs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ test/ | |
titleize.js | ||
_config.yml | ||
index.md | ||
.changeset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,12 @@ titleize('i-am-a-slug'); // result: I-Am-a-Slug | |
titleize('i-am-a-slug', { isSlug: true }); // result: I Am a Slug | ||
``` | ||
|
||
If you happen to have slugs that are use different separators, you can pass the separator for your string to `isSlug` and it will replace those. E.g.: | ||
|
||
```js | ||
titleize('i_am_a_slug', { isSlug: '_' }) // result: I Am a Slug | ||
``` | ||
|
||
#### Support, bug-reports, feature suggestions | ||
|
||
If you want to contribute, report a bug, or have a suggestion for a feature, contact me at [email protected] or contact me via Github or Twitter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.