View Source CozyParams

Actions Status

Provides Ecto-like API for casting and validating params.

why-another-package

Why another package?

There are some packages in the community:

NAMEBased on Ecto?Use Ecto-like API?
paramsYESNO
maru_paramsNONO
taramsNONO
...

But, they don't fit my requirements. The package in my dream should:

  • be based on Ecto which is robust and battle-tested.
  • use Ecto-like API, which eliminates friction when working on casting params and modeling data source at the same time.

installation

Installation

Add cozy_params to your list of dependencies in mix.exs:

def deps do
  [
    {:cozy_params, "~> 0.1.0"}
  ]
end

(Optional) And, it's encouraged to setup .formatter.exs for cozy_params:

[
  import_deps: [
    # ...
    :cozy_params
  ],
  # ...
]

overview

Overview

Visit HexDocs for more details.

which-module-should-i-use

Which module should I use?

uhhh-i-don-t-like-it

uhhh... I don't like it

You can try:

Find more at hex.pm.

license

License

Apache License 2.0