prodis / miss-elixir

Some functions that I miss in Elixir standard library (and maybe you too).
Apache License 2.0
42 stars 4 forks source link

What do you miss? #5

Open prodis opened 3 years ago

prodis commented 3 years ago

What do you miss in Elixir that is not part of the standard library?

This issue is an open space to suggest a new feature in Miss Elixir library.

For example:

The idea here is not to compete with Elixir features, but to have an opportunity to bring ideas for reusable common functions that for different reasons are not part (yet) of the Elixir standard library.

Read about the motivation behind creating the Miss Elixir library in this blog post: https://fernandohamasaki.com/miss-elixir.

You can drop your ideas in the comments. For potential new functions/features, new issues would be created to be refined or discussed in more details.

💜

rauann commented 2 years ago

Would be good to have a function to drop fields from a map by a given value, something like this:

iex> Miss.Map.drop_by_value(%{foo: "bar", bar: nil}, nil)
%{foo: "bar"}

It could even work with a list of values:

iex> Miss.Map.drop_by_value(%{foo: "bar", bar: nil}, [nil, "bar"])
%{}

WDYT?