Giter VIP home page Giter VIP logo

case's Introduction

@jeash/case

A lightweight package for converting string cases.

Installation

Install @jeash/case using npm:

npm install @jeash/case

Usage

Here is an example of how to use @jeash/case:

import { titleCase, kebabCase } from '@jeash/case';

const myTitleCaseString = titleCase('hello world');
const myKebabCaseString = kebabCase('hello world');

Alternatively, you can import the methods individually:

import titleCase from '@jeash/case/titleCase';
import kebabCase from '@jeash/case/kebabCase';

const myTitleCaseString = titleCase('hello world');
const myKebabCaseString = kebabCase('hello world');

API

@jeash/case exports the following methods:

alternatingCase

alternatingCase('Hello World') // => HeLlO WoRlD

alternatingInverseCase

alternatingInverseCase('Hello World') // => hElLo wOrLd

inverseCase

inverseCase('Hello World') // => hELLO wORLD

jejeCase

jejeCase('Hello World') // => HElLoH WOrlD

kebabCase

kebabCase('Hello World') // => hello-world

sentenceCase

sentenceCase('Hello World') // => Hello world

snakeCase

snakeCase('Hello World') // => hello_world

titleCase

titleCase('Hello World') // => Hello World

wideCase

wideCase('Hello World') // => H e l l o   W o r l d

wideLowerCase

wideLowerCase('Hello World') // => h e l l o   w o r l d

wideUpperCase

wideUpperCase('Hello World') // => H E L L O   W O R L D

Contributing

Contributions to @jeash/case are welcome. If you have any bug fixes, improvements or feature requests, please submit a pull request on GitHub.

case's People

Contributors

karmablackshaw avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.