ParentFull threadOakNinja·Your comment reminded me of this SO answer: https://stackoverflow.com/a/185576/1502563/* This is O(scary), but seems quick enough in practice. */View on HN