Use startsWith and endsWith for readability
This commit is contained in:
parent
bf7875bfaa
commit
08a59591ae
7 changed files with 8 additions and 8 deletions
|
@ -25,9 +25,9 @@ export const replacement = (match: string, key: string) => {
|
|||
arg == 'S' ? 'fas' :
|
||||
arg == 'B' ? 'fab' :
|
||||
'';
|
||||
} else if (arg[0] == '.') {
|
||||
} else if (arg.startsWith('.')) {
|
||||
classes.push('fa-' + arg.substr(1));
|
||||
} else if (arg[0] == '-') {
|
||||
} else if (arg.startsWith('-')) {
|
||||
transform = arg.substr(1).split('|').join(' ');
|
||||
} else {
|
||||
name = arg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue