https://github.com/dvoaviarison/format-title
Manipulate strings to give you the format you need: capitalized/non-capitalized per word etc...
https://github.com/dvoaviarison/format-title
capitalize string string-manipulation title-case
Last synced: 4 months ago
JSON representation
Manipulate strings to give you the format you need: capitalized/non-capitalized per word etc...
- Host: GitHub
- URL: https://github.com/dvoaviarison/format-title
- Owner: dvoaviarison
- License: mit
- Created: 2017-02-14T11:47:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-14T18:44:01.000Z (over 8 years ago)
- Last Synced: 2025-02-22T20:25:12.210Z (5 months ago)
- Topics: capitalize, string, string-manipulation, title-case
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# format-title
[](https://travis-ci.org/dvoaviarison/format-title)
Manipulate strings to give you the title format you need: capitalized/non-capitalized per word etc...
## Try me
You can try and see the result realtime [HERE](https://runkit.com/npm/format-title)## API List
```java
capWords(string)
capFirstWord(string)
capAll(string)
capCamelize(string)
lowWords(string)
lowFirstWord(string)
lowAll(string)
lowCamelize(string)
```## Example
Capitalize each word
```js
var formatTitle = require('format-title');
console.log(formatTitle.capWords('this is my title'));
// > This Is My Title
```Capitalize first word only
```js
var formatTitle = require('format-title');
console.log(formatTitle.capFirstWord('this is my title'));
// > This is my title
```Capitalize all (trivial)
```js
var formatTitle = require('format-title');
console.log(formatTitle.capAll('this is my title'));
// > THIS IS MY TITLE
```