Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scule

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scule

[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![Github Actions][github-actions-src]][github-actions-href] [![Codecov][codecov-src]][codecov-href] [![bundle][bundle-src]][bundle-href]

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
445K
decreased by-59.52%
Maintainers
1
Weekly downloads
 
Created
Source

🧵 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 upper case if followed by other upper case chars (like FooBAR), it is 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 preserves case

snakeCase

Splits string and joins by snake_case convention (foo-bar => foo_bar)

upperFirst(str)

Converts first charachter to upper case

lowerFirst(str)

Converts first charachter to lower case

splitByCase(str, splitters?)

  • Splits string by splitters (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

FAQs

Package last updated on 16 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc