export function _substringBeforeLast(s: string, delimiter: string): string {
  const pos = s.lastIndexOf(delimiter)
  return s.slice(0, pos !== -1 ? pos : undefined)
}