mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 20:41:52 +08:00
Refactor: minor changes here and there
This commit is contained in:
@@ -12,11 +12,9 @@ function createKeywordFilter(keys: string[] | Set<string>) {
|
||||
|
||||
// Create a trie with extra fields and information
|
||||
const put = (key: string) => {
|
||||
const len = key.length;
|
||||
|
||||
let node = root;
|
||||
|
||||
for (let idx = 0; idx < len; idx++) {
|
||||
for (let idx = 0, len = key.length; idx < len; idx++) {
|
||||
const char = key[idx];
|
||||
|
||||
if (node.has(char)) {
|
||||
|
||||
Reference in New Issue
Block a user