diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-07-07 19:19:00 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-07-07 19:19:00 +0900 |
| commit | aa4ef6745ad798bd7d4f05cb397ef1dd85279814 (patch) | |
| tree | d34ded516f52b91c4ff1a5443776ce22d8f483f0 /src/misc/acct/parse.ts | |
| parent | Refactorijg (diff) | |
| download | misskey-aa4ef6745ad798bd7d4f05cb397ef1dd85279814.tar.gz misskey-aa4ef6745ad798bd7d4f05cb397ef1dd85279814.tar.bz2 misskey-aa4ef6745ad798bd7d4f05cb397ef1dd85279814.zip | |
Refactorng
Diffstat (limited to 'src/misc/acct/parse.ts')
| -rw-r--r-- | src/misc/acct/parse.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/misc/acct/parse.ts b/src/misc/acct/parse.ts new file mode 100644 index 0000000000..0c00fccef6 --- /dev/null +++ b/src/misc/acct/parse.ts @@ -0,0 +1,4 @@ +export default (acct: string) => { + const splitted = acct.split('@', 2); + return { username: splitted[0], host: splitted[1] || null }; +}; |