import { toLatin } from "./toLatin" ; param prevChar param char returns export function isLeading ( prevChar , char ) { const precededBySeparator = prevChar === "-" || prevChar === "_" || prevChar === " " || prevChar === "." || prevChar === "/" || prevChar === "\\" ; const isCharLeading = char . toUpperCase ( ) === char && /\w/ . test ( toLatin ( char ) ) ; return precededBySeparator || isCharLeading ; }