View Source MyspaceIPFS.Utils (Myspace IPFS v0.1.0)
Some common functions that are used throughout the library.
Link to this section Summary
Functions
Filter out any empty values from a list. Removes nil, {}, [], and "".
Wraps the data in an elixir standard response tuple. {:ok, data} or {:error, data}
Removes a temporary file. To be used in a pipe, and hence returns the data sent to it.
Returns the current timestamp in unix time.
Returns the current timestamp in iso8601 format.
Unlists a list if it only contains one element.
Link to this section Types
@type fspath() :: MyspaceIPFS.fspath()
Link to this section Functions
Filter out any empty values from a list. Removes nil, {}, [], and "".
Wraps the data in an elixir standard response tuple. {:ok, data} or {:error, data}
Removes a temporary file. To be used in a pipe, and hence returns the data sent to it.
@spec timestamp() :: integer()
Returns the current timestamp in unix time.
@spec timestamp(:iso) :: binary()
Returns the current timestamp in iso8601 format.
Unlists a list if it only contains one element.