# `Mojibake.Property`
[🔗](https://github.com/zaerl/mojibake/blob/main/src/elixir/lib/mojibake/property.ex#L5)

The Unicode properties that Mojibake stores per codepoint.

A property is an atom made from its long name in `PropertyAliases.txt`, such as `:alphabetic`,
`:white_space`, `:extended_pictographic`, or `:line_break`.

Binary properties are true or false for each codepoint; query them with
`Mojibake.Char.property?/2`. Enumerated properties have one value per codepoint, such as
`:alphabetic` for the `:line_break` of "A"; query them with `Mojibake.Char.property/2`. Their
values are atoms made from the long value names in `PropertyValueAliases.txt`.

The enumerated properties are `:east_asian_width`, `:grapheme_cluster_break`,
`:indic_conjunct_break`, `:joining_type`, `:line_break`, `:script`, `:sentence_break`, and
`:word_break`. `General_Category`, `Bidi_Class`, `Canonical_Combining_Class`, and
`Decomposition_Type` come from `Mojibake.Char.info/1` instead.

# `t`

```elixir
@type t() :: atom()
```

A property, such as `:alphabetic`.

# `all`

```elixir
@spec all() :: [t()]
```

Every property, binary and enumerated.

## Examples

    iex> :white_space in Mojibake.Property.all()
    true

# `binary?`

```elixir
@spec binary?(t()) :: boolean()
```

Return `true` if `property` is a binary property, and `false` if it is an enumerated one or not
a property.

## Examples

    iex> Mojibake.Property.binary?(:alphabetic)
    true

    iex> Mojibake.Property.binary?(:line_break)
    false

# `values`

```elixir
@spec values(t()) :: [atom()] | nil
```

The values of the enumerated `property`, or `nil` if it is binary or not a property.

## Examples

    iex> Mojibake.Property.values(:east_asian_width)
    [:ambiguous, :fullwidth, :halfwidth, :neutral, :narrow, :wide]

---

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