# `Arc.Naming`
[🔗](https://github.com/Cratis/Arc.Elixir/blob/main/lib/arc/naming.ex#L4)

Name conversions shared by routing, the wire format and proxy generation.

Elixir names are `snake_case`; the Arc wire format and the generated TypeScript use
`camelCase`; conventional routes use lowercase `kebab-case`.

# `camel`

```elixir
@spec camel(atom() | String.t()) :: String.t()
```

Converts a `snake_case` name or atom to `camelCase`.

    iex> Arc.Naming.camel(:first_name)
    "firstName"

# `kebab`

```elixir
@spec kebab(atom() | String.t()) :: String.t()
```

Converts a `PascalCase` or `camelCase` name to `kebab-case`.

    iex> Arc.Naming.kebab("RegisterAuthor")
    "register-author"

# `module_parts`

```elixir
@spec module_parts(module()) :: {[String.t()], String.t()}
```

Splits a module into its namespace segments and its name.

    iex> Arc.Naming.module_parts(MyApp.Authors.Registration.RegisterAuthor)
    {["MyApp", "Authors", "Registration"], "RegisterAuthor"}

# `pascal`

```elixir
@spec pascal(atom() | String.t()) :: String.t()
```

Converts a `snake_case` function name to `PascalCase`, for query proxy class names.

    iex> Arc.Naming.pascal(:all_authors)
    "AllAuthors"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
