docs: function arraySort(arr, props, opts) {
    if (arr == null) {
      return [];
    }
  
    if (!Array.isArray(arr)) {
      throw new TypeError('array-sort expects an array.');
    }
  
    if (arguments.length === 1) {
      return arr.sort();
    }
  
    var args = flatten([].slice.call(arguments, 1));
  
    // if the last argument appears to be a plain object,
    // it's not a valid `compare` arg, so it must be options.
    if (typeOf(args[args.length - 1]) === 'object') {
      opts = args.pop();
    }
    return arr.sort(sortBy(args, opts));
  }