mirror of
https://github.com/zh-lx/pinyin-pro.git
synced 2026-03-13 09:51:38 +08:00
optimize: remove useless code
This commit is contained in:
@@ -96,7 +96,7 @@ export class AC {
|
||||
|
||||
while (queue.length > queueIndex) {
|
||||
let node = queue[queueIndex++] as TrieNode;
|
||||
let failNode = node && node.parent && node.parent.fail as TrieNode | null;
|
||||
let failNode = node.parent && node.parent.fail as TrieNode | null;
|
||||
let key = node.key;
|
||||
|
||||
while (failNode && !failNode.children.has(key)) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DoubleUnicodePrefixReg, DoubleUnicodeSuffixReg, DoubleUnicodeReg } from './constant';
|
||||
import { DoubleUnicodeReg } from './constant';
|
||||
|
||||
export function getStringLength(string: string) {
|
||||
return string.replace(DoubleUnicodeReg, '_').length;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { configDefaults, defineConfig } from 'vitest/config';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import path from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
Reference in New Issue
Block a user