~mika/www.m1kadev.nl

ref: 7396766ff9b6cae5c4aa4103853c899943362bb9 www.m1kadev.nl/kethel/lib/filex.ex -rw-r--r-- 227 bytes
7396766f — m1ka add compression to nginx config in prod 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
defmodule FileX do
  @typedoc "Any path"
  @type path() :: binary()

  @spec trimmed_filename(path()) :: binary()
  def trimmed_filename(path) do
    Path.basename(path) |> Path.rootname() |> String.replace("-", "_")
  end
end