Closed sitch closed 4 years ago
Currently, this is by design. Because, when you have multiple applications using file_size in the same project, you would be able globally override the parser behavior for all applications which can lead to unexpected behavior.
However, for your use case it would be possible to introduce FileSize.parse/2
(similar to FileSize.format/2
) so we could pass some options to the parser, for example:
FileSize.parse("1 k", symbols: %{kb: "k", m: "M"})
You are very welcome to open a pull request. :) Closing this for now.
adding:
Still fails for