peach a19a732be8 commit message | 2 年 前 | |
---|---|---|
.. | ||
dist | 2 年 前 | |
CHANGELOG.md | 2 年 前 | |
LICENSE | 2 年 前 | |
README.md | 2 年 前 | |
package.json | 2 年 前 |
Install using npm or yarn:
npm i scule
# or
yarn add scule
Import:
// CommonJS
const { pascalCase } = require('scule')
// ESM
import { pascalCase } from 'scule'
Notice: You may need to transpile package for legacy environments
pascalCase(str)
Splits string and joins by PascalCase convention (foo-bar
=> FooBar
)
Remarks:
FooBAR
), they are preservedcamelCase
Splits string and joins by camelCase convention (foo-bar
=> fooBar
)
kebabCase(str)
Splits string and joins by kebab-case convention (fooBar
=> foo-bar
)
Remarks:
snakeCase
Splits string and joins by snake_case convention (foo-bar
=> foo_bar
)
upperFirst(str)
Converts first character to upper case
lowerFirst(str)
Converts first character to lower case
splitByCase(str, splitters?)
['-', '_', '/', '.]
)