@phensley/cldr-core
Version:
Core library for @phensley/cldr
15 lines (14 loc) • 481 B
TypeScript
import { LanguageTag } from './languagetag';
/**
* Default distance threshold.
*/
export declare const DEFAULT_THRESHOLD = 50;
/**
* Maximum possible distance between two language tags.
*/
export declare const MAX_DISTANCE = 100;
/**
* Return the distance between the desired and supported locale, stopping once
* the given threshold is exceeded.
*/
export declare const getDistance: (desired: LanguageTag, supported: LanguageTag, threshold?: number | undefined) => number;