Naming Convention Transfer
ke-bab! s_nake! caMel! PasCal!
Transfer your naming convention for each case!
Installation
npm (commonjs)
npm install naming-convention-transfer
browser (iife)
Please download this file.
And embed script tag in your document.
<script src="./dist/naming-convention-transfer.js"></script>
Example
Nodejs
import { pascalToSnake } from 'naming-convention-transfer';
pascalToSnake('NamingConventionTransfer') === 'naming_convention_transfer';
Browser
NamingConventionTransfer.camelToKebab('namingConventionTransfer') === 'naming-convention-transfer';
API
Name | Description |
---|
kebabToSnake | Transfer from kebab-case to snake_case |
kebabToCamel | Transfer from kebab-case to camelCase |
kebabToPascal | Transfer from kebab-case to PascalCase |
snakeToKebab | Transfer from snake_case to kebab-case |
snakeToCamel | Transfer from snake_case to camelCase |
snakeToPascal | Transfer from snake_case to PascalCase |
camelToPascal | Transfer from camelCase to PascalCase |
camelToKebab | Transfer from camelCase to kebab-case |
camelToSnake | Transfer from camelCase to snake_case |
pascalToCamel | Transfer from PascalCase to camelCase |
pascalToKebab | Transfer from PascalCase to kebab-case |
pascalToSnake | Transfer from PascalCase to snake_case |