export default function idFromString (text) {
  // TestCafe cocks up optional chaining. This split fixes it.
  const lower = text?.toLowerCase?.()
  return lower ? lower.replaceAll(/\W/g, '-') : null
}
