Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/froebel/string.ts>camel

A strictly typed utility library.
Latest
variable camel
import { camel } from "https://deno.land/x/froebel@v0.23.2/string.ts";

Transforms a variable name to camel case.

Note: The rules for transforming anything to camel case are somewhat vague. So use this only for very simple names where the resulting value is absolutely unambiguous. For more examples of how names are transformed, have a look at the test cases.

Examples

Example 1

camel('foo_bar') // 'fooBar'

type

<T extends string>(str: T) => CamelCase<T>