Guava inspired ordering utility for javascript sorting