Reduce tablejs sort functions