cleanLink(v) strips a single trailing ., ,, or " — the
punctuation a link often picks up when copied from a sentence —
returning the cleaned string. Part of pota/use/url.
| Argument | Type | Description |
|---|---|---|
v |
string |
The link to clean up. |
Returns: the string with one trailing ., ,, or " removed (if
present).
Removes a single trailing ., ,, or " a link picks up when copied
out of a sentence.
import { cleanLink } from 'pota/use/url'
cleanLink('https://pota.quack.uy/.') // 'https://pota.quack.uy/'
cleanLink('https://pota.quack.uy/,') // 'https://pota.quack.uy/'
cleanLink('https://pota.quack.uy/') // 'https://pota.quack.uy/'