cake-case
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

Cake Case

Build Status npm version Downloads

The simple utility methods that converts string case. It's optimized for use in code, such as variable or key of object.

Installation

npm install cake-case

Usage

import * as Case from 'cake-case';

Case.lower('HelloWorld');         // 'hello world'
Case.lower('HelloWorld', '-');    // 'hello-world'
Case.upper('hello-world');        // 'HELLO WORLD'
Case.upper('hello-world', '_');   // 'HELLO_WORLD'
Case.capital('hello_world');      // 'Hello World'
Case.capital('hello_world', '');  // 'HelloWorld'

Case.camel('hello world');  // 'helloWorld'
Case.pascal('hello world'); // 'HelloWorld'
Case.kebab('HelloWorld');   // 'hello-world'
Case.snake('helloWorld');   // 'hello_world'

License

The MIT License

Readme

Keywords

Package Sidebar

Install

npm i cake-case

Weekly Downloads

0

Version

1.2.3

License

MIT

Unpacked Size

23.1 kB

Total Files

20

Last publish

Collaborators

  • archco