https://github.com/vinay-nb/usestringformatter
useStringFormatter is custom hook helps in converting string to lowercase, uppercase, camelCase, pascalCase, snakeCase, kebabCase and trims the extra spaces.
https://github.com/vinay-nb/usestringformatter
camelcase customhooks hooks pascalcase react strings typescript
Last synced: 8 months ago
JSON representation
useStringFormatter is custom hook helps in converting string to lowercase, uppercase, camelCase, pascalCase, snakeCase, kebabCase and trims the extra spaces.
- Host: GitHub
- URL: https://github.com/vinay-nb/usestringformatter
- Owner: vinay-nb
- Created: 2023-11-13T03:21:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-13T14:00:11.000Z (about 2 years ago)
- Last Synced: 2025-06-04T19:05:26.336Z (8 months ago)
- Topics: camelcase, customhooks, hooks, pascalcase, react, strings, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@vinaybhat/usestringformatter
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# useStringFormatter
useStringFormatter is custom hook helps in converting string to lowercase, uppercase, camelCase,
pascalCase, snakeCase, kebabCase and trims the extra spaces.
# Usage
- Import the useStringFormatter in your project
```
import useStringFormatter from '@vinaybhat/usestringformatter/lib/useStringFormatter';
- pass the string as an argument to the useStringFormatter('string')
- useStringFormatter returns the object of functions.
- each functions can be invoked as
```
const stringHandler = useStringFormatter('string');
stringHandler.lowerCase();
stringHandler.upperCase();
stringHandler.camelCase();
stringHandler.pascalCase();
stringHandler.snakeCase();
stringHandler.trim();
```
# installation
To use the custom hook install the hook by using
`npm install useStringFormatter`
# contribute
- Open the pull request
- Provide a clear description about PR
- Test the code base with your changes