Skip to content

Commit

Permalink
Merge pull request #7 from chrislaskey/allowlist
Browse files Browse the repository at this point in the history
Rename `whitelist` option to `allowlist`
  • Loading branch information
chrislaskey authored Nov 9, 2021
2 parents 89a6553 + b944e77 commit 69466c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/assoc/util.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule Assoc.Util do
Options:
`:whitelist` -> List of strings to convert to atoms. When passed, only strings in whitelist will be converted.
`:allowlist` -> List of strings to convert to atoms. When passed, only strings in allowlist will be converted.
Example:
Expand All @@ -29,12 +29,12 @@ defmodule Assoc.Util do
key

true ->
case Keyword.get(options, :whitelist) do
case Keyword.get(options, :allowlist) do
nil ->
String.to_atom(key)

whitelist ->
case Enum.member?(whitelist, key) do
allowlist ->
case Enum.member?(allowlist, key) do
false -> key
true -> String.to_atom(key)
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Assoc.MixProject do
use Mix.Project

@version "0.1.7"
@version "0.2.0"

def project do
[
Expand Down

0 comments on commit 69466c1

Please sign in to comment.