# `MishkaSlug.Options`
[🔗](https://github.com/mishka-group/mishka_slug/blob/v0.0.1/lib/mishka_slug/options.ex#L5)

The options `MishkaSlug.slugify/2` and `MishkaSlug.Change` accept.

The schema lives here once. `validate/1` checks a keyword list against it, fills the defaults
and refuses any key it does not know, so a misspelled option is an error and never a silently
ignored one. See `MishkaSlug.slugify/2` for what each option does.

# `t`

```elixir
@type t() :: %MishkaSlug.Options{
  digits: (:keep | :ascii) | nil,
  keep: [String.t()] | nil,
  language: (String.t() | nil) | nil,
  latin: (:ascii | :keep) | nil,
  locales: [String.t()] | nil,
  max_length: (pos_integer() | nil) | nil,
  mixed_scripts: (:split | :reject) | nil,
  script_resolver: ({module(), atom(), list()} | nil) | nil,
  trim_kept: boolean() | nil,
  zwnj: (:remove | :separator) | nil
}
```

# `builder`

# `enforce_keys`

# `enforce_keys`

# `example`

A sample %MishkaSlug.Options{} populated from defaults + type-based fallbacks.

# `keys`

# `keys`

# `validate`

```elixir
@spec validate(keyword()) :: {:ok, keyword()} | {:error, String.t()}
```

Validates `opts` and returns them as a keyword list with every default filled in.

Returns `{:ok, opts}`, or `{:error, message}` that names the options that failed.

# `validate!`

```elixir
@spec validate!(keyword()) :: keyword()
```

Same as `validate/1`, but returns the options or raises `ArgumentError`.

---

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