https://github.com/orlowdev/case-transformer
Transform a kebab back to camel.
https://github.com/orlowdev/case-transformer
Last synced: about 1 year ago
JSON representation
Transform a kebab back to camel.
- Host: GitHub
- URL: https://github.com/orlowdev/case-transformer
- Owner: orlowdev
- License: mit
- Created: 2019-06-18T06:59:19.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T00:46:11.000Z (over 3 years ago)
- Last Synced: 2025-03-11T21:05:18.453Z (over 1 year ago)
- Language: TypeScript
- Size: 1.02 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @priestine/case-transformer
[](https://travis-ci.org/priestine/case-transformer)
[](https://codecov.io/gh/priestine/case-transformer)
[](https://www.npmjs.com/package/@priestine/case-transformer)
[](https://www.npmjs.com/package/@priestine/case-transformer)
[](https://github.com/prettier/prettier)
[](https://github.com/priestine/semantics)
Transform kebab back to camel. Or maybe make a kebab from Pascal.
## Installation
```bash
npm i -g @priestine/case-transformer
```
## Usage
UNDER CONSTRUCTION!
```javascript
const { transformCase, toUpperSnakeCase } = require('@priestine/case-transformer');
// The eloquent and declarative way
const hw = transformCase('helloWorld').from.camel.to.kebab;
hw; // hello-world
// The deductive but dangerous way (there are dragons here!)
const H_W = toUpperSnakeCase('helloWorld');
H_W; // HELLO_WORLD
```
```typescript
import { transformCase } from '@priestine/case-transformer';
// The TypeScript-friendly way
const hW = transformCase('here.there').from.dot.to.snake.toString();
hW; // here_there
```