// common/Sort.js
function Sort(obj) {
  if (typeof obj == 'object') { // assume it is an array
    if (typeof obj[0] == 'number') {
      obj = obj.sort((a, b) => a - b);
    } else {
      obj = obj.sort();
    }
  } else { // assume a string
    return obj.split('').sort().join('');
  }
}