Install using npm or yarn:
npm i scule
# or
yarn add scule
Import:
// CommonJS
const { pascalCase } = require('scule')
// ESM
import { pascalCase } from 'scule'
undefinedNotice: You may need to transpile package for legacy environments
pascalCase(str)Splits string and joins by PascalCase convention (foo-bar => FooBar)
undefinedRemarks:undefined
FooBAR), they are preservedcamelCaseSplits string and joins by camelCase convention (foo-bar => fooBar)
kebabCase(str)Splits string and joins by kebab-case convention (fooBar => foo-bar)
undefinedRemarks:undefined
snakeCaseSplits 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?)['-', '_', '/', '.])We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.