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 🙏

© 2026 – Pkg Stats / Ryan Hefner

devkits-text-case

v1.0.3

Published

Convert text between camelCase, snake_case, kebab-case, PascalCase & more — zero dependencies

Readme

devkits-text-case

Convert text between camelCase, snake_case, kebab-case, PascalCase, and more. Zero dependencies.

Install

npm install -g devkits-text-case

npm version

Usage

CLI

# Convert to camelCase
textcase "hello world" -t camel
# Output: helloWorld

# Convert to snake_case
textcase "HelloWorld" -t snake
# Output: hello_world

# Convert to kebab-case
textcase "my_variable_name" -t kebab
# Output: my-variable-name

# Convert to PascalCase
textcase "my-variable" -t pascal
# Output: MyVariable

# List all formats
textcase -l

Programmatic API

const { toWords, CASES } = require('devkits-text-case');

// Parse text into words
const words = toWords('helloWorld');  // ['hello', 'world']
const words2 = toWords('my_variable'); // ['my', 'variable']

// Convert using built-in converters
CASES.camel(['hello', 'world']);      // 'helloWorld'
CASES.snake(['hello', 'world']);      // 'hello_world'
CASES.kebab(['hello', 'world']);      // 'hello-world'
CASES.pascal(['hello', 'world']);     // 'HelloWorld'
CASES.constant(['hello', 'world']);   // 'HELLO_WORLD'

Supported Formats

| Format | Alias | Example | |--------|-------|---------| | camelCase | camel | myVariableName | | PascalCase | pascal | MyVariableName | | snake_case | snake | my_variable_name | | CONSTANT_CASE | constant | MY_VARIABLE_NAME | | kebab-case | kebab | my-variable-name | | UPPER CASE | upper | MY VARIABLE NAME | | lower case | lower | my variable name | | Title Case | title | My Variable Name | | Sentence case | sentence | My variable name | | dot.case | dot | my.variable.name |

Use Cases

  • Programming — Convert between naming conventions (JavaScript camelCase ↔ Python snake_case)
  • Database — Convert column names between conventions
  • API development — Standardize field naming across services
  • Refactoring — Batch rename variables in code
  • CSS — Convert between camelCase and kebab-case properties

Examples

# JavaScript to Python
$ textcase "userName" -t snake
user_name

# Python to JavaScript
$ textcase "user_name" -t camel
userName

# CSS property conversion
$ textcase "background-color" -t camel
backgroundColor

# Database column naming
$ textcase "FirstName" -t snake
first_name

# Constants
$ textcase "max_retry_count" -t constant
MAX_RETRY_COUNT

Features

  • Smart parsing — Handles camelCase, snake_case, kebab-case, spaces, dots
  • 10 formats — All common naming conventions covered
  • Zero dependencies — Pure JavaScript, no external packages
  • Programmatic API — Use in your own Node.js scripts
  • CLI + library — Works as command tool or npm module

Related Tools

🔍 Build something amazing? Check out API Monitor — simple, affordable API monitoring for indie hackers. Get alerted before your customers notice. Just $9/mo.

See Also

Support DevKits

If you find this tool useful, please consider supporting the project:

Open Collective

Become a sponsor: Open Collective - DevKits

Crypto Donations

Prefer crypto? We accept:

  • ETH (Ethereum): 0xDea4a6A20fCB44467e45Ef378972F54B22dC59db
  • USDC (ERC-20): 0xDea4a6A20fCB44467e45Ef378972F54B22dC59db

Donation Perks:

  • $5+ — Supporter Badge
  • $10+ — Pro Access (1 month)
  • $29+ — Pro Access (1 year)
  • $100+ — Lifetime Pro + Priority Support

After donating, email your transaction hash to [email protected] to claim perks.

View Crypto Donation Page

License

MIT — DevKits Team