You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gaoshuguang 4b3ed4c085 2024年08月09日 1.0.0 初始化收费站版本实时信息查询,在原有集中监控版本上增加实时信息查询页面 1 year ago
..
dist 2024年08月09日 1.0.0 初始化收费站版本实时信息查询,在原有集中监控版本上增加实时信息查询页面 1 year ago
CHANGELOG.md 2024年08月09日 1.0.0 初始化收费站版本实时信息查询,在原有集中监控版本上增加实时信息查询页面 1 year ago
LICENSE 2024年08月09日 1.0.0 初始化收费站版本实时信息查询,在原有集中监控版本上增加实时信息查询页面 1 year ago
README.md 2024年08月09日 1.0.0 初始化收费站版本实时信息查询,在原有集中监控版本上增加实时信息查询页面 1 year ago
package.json 2024年08月09日 1.0.0 初始化收费站版本实时信息查询,在原有集中监控版本上增加实时信息查询页面 1 year ago

README.md

🧵 Scule

npm version npm downloads Github Actions Codecov bundle

Install

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

Utils

pascalCase(str)

Splits string and joins by PascalCase convention (foo-bar => FooBar)

Remarks:

  • If an uppercase letter is followed by other uppercase letters (like FooBAR), they are preserved

camelCase

Splits string and joins by camelCase convention (foo-bar => fooBar)

kebabCase(str)

Splits string and joins by kebab-case convention (fooBar => foo-bar)

Remarks:

  • It does not preserve case

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?)

  • Splits string by the splitters provided (default: ['-', '_', '/', '.])
  • Splits when case changes from lower to upper (only rising edges)
  • Case is preserved in returned value
  • Is an irreversible function since splitters are omitted

License

MIT