Skip to content

suggestKey

This content is not available in your language yet.

suggestKey(unknown, known, threshold?): string | null

Defined in: core/src/typo-suggest.ts:43

unknown 과 가장 가까운 known 키 중 거리 <= threshold 인 것 반환.

threshold 기본 2 — 짧은 키 (3자 이하) 는 거리 2 만 허용해도 false positive 가 많아질 수 있으므로 길이별로 자동 조정 (Math.min(threshold, ceil(len/3))).

다중 매치 시 가장 짧은 거리, 동률이면 알파벳순.

string

readonly string[]

number = 2

string | null