Skip to main content
Deno 2 is finally here 🎉️
Learn more

camelCase

GitMoji License: MIT Lines Of Code CodeQL CodeQL

Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: foo-bar → fooBar

Correctly handles Unicode strings.

You can get this package by nest.land, deno.land or denopkg.

Usage

This package exposes two Functions, camelCase and camelCaseSync.

import camelcase, { camelCaseSync } from "https://deno.land/x/camelcase/mod.ts";

console.log(await camelcase("foo-bar-lol example_34 spaced word"));

console.log(camelCaseSync("Foo_bar"));

See example.ts and mod_test.ts for more examples usage.

License

This project is licensed under the MIT License.