feat(WIP): 장비매매
- 초성 검색을 일원화
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { automata초성All } from "./automata초성";
|
||||
import { filter초성withAlphabet } from "./filter초성withAlphabet";
|
||||
|
||||
export function convertSearch초성(text: string): string[]{
|
||||
const [filteredTextH, filteredTextA] = filter초성withAlphabet(text.replace(/\s+/g, ""));
|
||||
const [filteredTextHL1, filteredTextHL2] = automata초성All(filteredTextH);
|
||||
|
||||
return [text, filteredTextA, filteredTextH, filteredTextHL1, filteredTextHL2];
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
type Entries<T> = {
|
||||
[K in keyof T]: [K, T[K]];
|
||||
}[keyof T][];
|
||||
|
||||
export function entriesWithType<T>(value: T): Entries<T>{
|
||||
return Object.entries(value) as unknown as Entries<T>;
|
||||
}
|
||||
Reference in New Issue
Block a user