UNPKG

taraskevizer

Version:

Канвэртацыя акадэмічнага правапісу ў клясычны

9 lines (8 loc) 281 B
import { noSoften, softeners } from '../dict/softening.js'; export const soften = (text) => { text = noSoften(text); do { text = softeners(text); } while (softeners.value.some(({ 0: pattern }) => pattern.test(text))); return text.replace(/\ue0ff/g, ''); };