Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
is this as simple as something like:
or is there some better algorithm to use?
If it's as simple as above I can try to look at making a PR for it.