Skip to content

Commit

Permalink
rename helper module to "utils.ex" for clarity #1
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Oct 12, 2019
1 parent 8ccc507 commit 053f2b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/clean.ex → lib/utils.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Clean do
defmodule Utils do
def remove_noise do
{:ok, data} = File.read("quotes_raw.json")
list = Jason.decode!(data)
Expand All @@ -18,4 +18,11 @@ defmodule Clean do
IO.inspect Enum.count(clean)
File.write!("quotes.json", Jason.encode!(clean))
end

def count do
File.read!("quotes.json")
|> Jason.decode!()
|> Enum.count
|> IO.inspect(label: "count")
end
end

0 comments on commit 053f2b7

Please sign in to comment.