json-fs-query
    Preparing search index...

    Function sortBy

    • Sort by each clause in turn: missing, then null, then the values, compared by the field's declared type when the clause has one (see compareAs), so a string field sorts as text ('10' before '9') and an int field as numbers.

      Parameters

      • dataSet: any[] = []
      • sortClauses: any[] = []

      Returns any[]