blob: e3bed35d8efca7e2abcf36c06c60227266efa1bb (
plain)
1
2
3
4
5
6
7
|
import Acct from './type';
export default (acct: string): Acct => {
if (acct.startsWith('@')) acct = acct.substr(1);
const split = acct.split('@', 2);
return { username: split[0], host: split[1] || null };
};
|