mirror of
https://github.com/ItsVipra/ProToots
synced 2024-11-25 04:50:18 +00:00
add documentation
This commit is contained in:
parent
97553400cf
commit
c5518b1867
1 changed files with 7 additions and 0 deletions
|
@ -17,6 +17,13 @@ export function normaliseAccountName(name) {
|
|||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns a link to an account on a remote instance into a username.
|
||||
*
|
||||
* e.g. `https://example.com/@test` -> `@test@example.com`
|
||||
* @param {string} url URL to an account on their own instance
|
||||
* @returns {string} username (not normalised)
|
||||
*/
|
||||
export function accountNameFromURL(url) {
|
||||
const splitURL = url.split("/");
|
||||
|
||||
|
|
Loading…
Reference in a new issue