Link (link v1.0.1)
Link
is a little link parsing, compacting and shortening library.
Link to this section Summary
Functions
compact/1
reduces a url
compact_github_url/1
does exactly as its' name implies:
compact a GitHub URL down to it's simplest version
so that we aren't wasting characters on a mobile screen.
Link to this section Functions
Link to this function
compact(url)
compact/1
reduces a url
examples
Examples
iex> Link.compact("https://github.com/dwyl/mvp/issues/141")
"dwyl/mvp#141"
# Can't understand the URL, just return it sans protocol:
iex> Link.compact("https://git.io/top")
"git.io/top"
Link to this function
compact_github_url(url)
compact_github_url/1
does exactly as its' name implies:
compact a GitHub URL down to it's simplest version
so that we aren't wasting characters on a mobile screen.
examples
Examples
iex> Link.compact_github_url("https://github.com/dwyl/mvp/issues/141")
"dwyl/mvp#141"
iex> Link.compact_github_url("https://github.com/dwyl/app/issues/275#issuecomment-1646862277")
"dwyl/app#275"
iex> Link.compact_github_url("https://github.com/dwyl/link#123")
"dwyl/link"
Link to this function