npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@dekk-utils/string-case

v0.1.2

Published

convert the case of a string

Downloads

5

Readme

string-case

Codacy Badge Codacy Badge

Convert the case of a string

Installation

yarn add @dekk-utils/string-case
## with npm
# npm install @dekk-utils/string-case

Modules

caseToCase

import { camelToSnake } from "@dekk-utils/string-case/camel/snake";
camelToSnake("fooBar")
// foo_bar

from

import { from } from "@dekk-utils/string-case/from";
from.camel.to.snake("fooBar")
// foo_bar

to

import { to } from "@dekk-utils/string-case/to";
to.snake.from.camel("fooBar")
// foo_bar

convert

import { convert } from "@dekk-utils/string-case/convert";
convert.snake.to.camel("fooBar")
// foo_bar
convert.camel.from.snake("fooBar")
// foo_bar

is

import { is } from "@dekk-utils/string-case/is";
is.camel("fooBar")
// true
is.snake("fooBar")
// false

isCamel

import { isCamel } from "@dekk-utils/string-case/is/camel";
isCamel("fooBar")
// true
isCamel("foo_bar")
// false

isKebab

import { isKebab } from "@dekk-utils/string-case/is/kebab";
isKebab("foo-bar")
// true
isKebab("foo_bar")
// false

isPascal

import { isPascal } from "@dekk-utils/string-case/is/pascal";
isPascal("FooBar")
// true
isPascal("foo_bar")
// false

isScreamingKebab

import { isScreamingKebab } from "@dekk-utils/string-case/is/screaming-kebab";

isScreamingKebab("Foo-Bar")
// true
isScreamingKebab("foo_bar")
// false

isScreamingSnake

import { isScreamingSnake } from "@dekk-utils/string-case/is/screaming-snake";

isScreamingSnake("Foo_Bar")
// true
isScreamingSnake("foo_bar")
// false

isSnake

import { isSnake } from "@dekk-utils/string-case/is/snake";

isSnake("foo_bar")
// true
isSnake("fooBar")
// false

isLower

import { isLower } from "@dekk-utils/string-case/is/lower";

isLower("foobar")
// true
isLower("fooBar")
// false

isUpper

import { isUpper } from "@dekk-utils/string-case/is/upper";

isUpper("FOOBAR")
// true
isUpper("fooBar")
// false

isButton

import { isButton } from "@dekk-utils/string-case/is/button";

isButton("Foo Bar")
// true
isButton("fooBar")
// false

isSentence

import { isSentence } from "@dekk-utils/string-case/is/sentence";

isSentence("Foo bar")
// true
isSentence("fooBar")
// false

getCase

import { getCase } from "@dekk-utils/string-case/get-case";
getCase("fooBar")
// camel
getCase("foo_bar")
// snake

toCase

import { toCase } from "@dekk-utils/string-case/to-case";
// As default export
// import toCase from "@dekk-utils/string-case";
toCase("fooBar", "snake")
// foo_bar
toCase("foo_bar", "camel")
// fooBar

toCamelCase

import { toCamelCase } from "@dekk-utils/string-case/to-camel-case";

toCamelCase("foo_bar")
// fooBar

toKebabCase

import { toKebabCase } from "@dekk-utils/string-case/to-kebab-case";

toKebabCase("foo_bar")
// foo-bar

toPascalCase

import { toPascalCase } from "@dekk-utils/string-case/to-pascal-case";

toPascalCase("foo_bar")
// FooBar

toScreamingKebabCase

import { toScreamingKebabCase } from "@dekk-utils/string-case/to-screaming-kebab-case";

toScreamingKebabCase("foo_bar")
// FOO-BAR

toScreamingSnakeCase

import { toScreamingSnakeCase } from "@dekk-utils/string-case/to-screaming-snake-case";

toScreamingSnakeCase("foo_bar")
// FOO_BAR

toSnakeCase

import { toSnakeCase } from "@dekk-utils/string-case/to-snake-case";

toSnakeCase("fooBar")
// foo_bar