https://github.com/andre-araujo/font-case-parser
https://github.com/andre-araujo/font-case-parser
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andre-araujo/font-case-parser
- Owner: andre-araujo
- Created: 2017-10-05T00:50:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-27T15:54:23.000Z (over 7 years ago)
- Last Synced: 2025-03-01T11:37:06.479Z (3 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Font Case
Library to convert string font cases.
Converts a string between `Sentense case`, `camelCase`, `kebab-case` and `snake_case`, also have some useful string features.
## Usage
---### Basic Conversion
Import any conversion method from `font-case` package.
```javascript
import { toKebabCase } from 'font-case';const someString = 'some text to convert';
const convertedString = toKebabCase(someString);
// some-text-to-convert
```## API Reference
| Method | Description |
| --------- | ----------- |
| toCamelCase() | spaced text to lower `camelCase` |
| fromCamelCase() | `camelCase` to spaced text |
| toKebabCase() | spaced text to `kebab-case` |
| fromKebabCase() | `kebab-case` to spaced text |
| toSnakeCase() | spaced text to `snake_case` |
| fromSnakeCase() | `snake_case` to spaced text |
| capitalize() | `Capitalize` first letter |