mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
refactor: use eslint-config-neon for packages. (#8579)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
const isASymbol = (char: string) => '-!$%^&*()_+|~=`{}[]:;<>?,. '.includes(char);
|
||||
|
||||
export function splitVarName(str: string) {
|
||||
const res: string[][] = [];
|
||||
let currGroup: string[] = [];
|
||||
let currStr = '';
|
||||
|
||||
const isASymbol = (char: string) => '-!$%^&*()_+|~=`{}[]:;<>?,. '.includes(char);
|
||||
|
||||
for (const char of str) {
|
||||
const currentlyInASymbolSection = isASymbol(currStr[0]!);
|
||||
const charIsASymbol = isASymbol(char);
|
||||
@@ -13,6 +13,7 @@ export function splitVarName(str: string) {
|
||||
if (char === '.') {
|
||||
continue;
|
||||
}
|
||||
|
||||
currGroup.push(currStr);
|
||||
currStr = char;
|
||||
|
||||
@@ -24,6 +25,7 @@ export function splitVarName(str: string) {
|
||||
currStr += char;
|
||||
}
|
||||
}
|
||||
|
||||
currGroup.push(currStr);
|
||||
res.push(currGroup);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user