split は不規則動詞
This commit is contained in:
Acid Chicken (硫酸鶏) 2018-12-25 16:49:35 +09:00 committed by GitHub
parent 10d3b81251
commit 89ac15b4de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
export default (acct: string) => { export default (acct: string) => {
if (acct.startsWith('@')) acct = acct.substr(1); if (acct.startsWith('@')) acct = acct.substr(1);
const splitted = acct.split('@', 2); const split = acct.split('@', 2);
return { username: splitted[0], host: splitted[1] || null }; return { username: split[0], host: split[1] || null };
}; };