index.js
function multisort(properties) {
    return function multiCompare(a, b) {
      var i = 0;
      var result = 0;
      var numberOfProperties = properties.length;
      while(result === 0 && i < numberOfProperties) {
        result = sort(properties[i])(a, b);
        i++;
      }
      return result;
    };
  }
function multisort(properties) {
    return function multiCompare(a, b) {
      var i = 0;
      var result = 0;
      var numberOfProperties = properties.length;
      while(result === 0 && i < numberOfProperties) {
        result = sort(properties[i])(a, b);
        i++;
      }
      return result;
    };
  }
function multisort ( properties ) { return function multiCompare ( a , b ) { var i = 0 ; var result = 0 ; var numberOfProperties = properties . length ; while ( result === 0 && i < numberOfProperties ) { result = sort ( properties [ i ] ) ( a , b ) ; i ++ ; } return result ; } ; }
sort by multiple properties
sort by multiple properties