src/text/methods/sort/methods.js
function(arr) {
  arr = arr.sort((a, b) => {
    if (a.index > b.index) {
      return 1;
    }
    if (a.index === b.index) {
      return 0;
    }
    return -1;
  });
  //return ts objects
  return arr.map((o) => o.ts);
}
function(arr) {
  arr = arr.sort((a, b) => {
    if (a.index > b.index) {
      return 1;
    }
    if (a.index === b.index) {
      return 0;
    }
    return -1;
  });
  //return ts objects
  return arr.map((o) => o.ts);
}
function ( arr ) { arr = arr . sort ( ( a , b ) => { if ( a . index > b . index ) { return 1 ; } if ( a . index === b . index ) { return 0 ; } return - 1 ; } ) ; //return ts objects return arr . map ( ( o ) => o . ts ) ; }
perform sort on pre-computed values
perform sort on pre - computed values