Package Exports
- root-name
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (root-name) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
root-name
Extracts root name of a name.
Supported languages: ro, ru.
Usage
import rootName from 'root-name'
const lang = 'ru'
rootName('Владимира Путина', lang) // Владимир Путин
rootName('Санкт-Петербургской', lang) // Санкт-Петербург
rootName('Federației Ruse', 'ro') // Federați Rus
rootName('Federația Rusă', 'ro') // Federați Rus
rootName('COMISIEI EUROPENe', 'ro') // COMISI EUROPE
API
rootName(name: string, lang: string, options?: Options): string
export enum RuleAccuracy {
LOW = 0,
NORMAL = 1,
HIGH = 2
}
export type Options = {
accuracy?: RuleAccuracy
minWordLength?: number
}