index.js
function reach (curr, next, reachable) {
  if (!next) return false
  if (!curr) return true

  const here = reachable[curr]
  if (!here || !here[next]) return false
  return here[next].length === 1
}
function reach (curr, next, reachable) {
  if (!next) return false
  if (!curr) return true

  const here = reachable[curr]
  if (!here || !here[next]) return false
  return here[next].length === 1
}
function reach ( curr , next , reachable ) { if ( ! next ) return false if ( ! curr ) return true const here = reachable [ curr ] if ( ! here || ! here [ next ] ) return false return here [ next ] . length === 1 }
check if state can reach in reach str, str, obj -> bool
check if state can reach in reach str str obj - > bool