Nymph.js 1.0.0-beta.113
    Preparing search index...

    Type Alias SortOptions<Entity>

    type SortOptions<Entity extends Object> = {
        caseSensitive?: boolean;
        collatorOptions?: Intl.CollatorOptions;
        comparator?: (a: any, b: any) => number;
        identiticalResolver?: (a: Entity, b: Entity) => number;
        reverse?: boolean;
    }

    Type Parameters

    • Entity extends Object
    Index

    Properties

    caseSensitive?: boolean

    Sort case sensitively.

    collatorOptions?: Intl.CollatorOptions

    Options to pass to Intl.Collator for string comparisons. This overrides the caseSensitive options.

    comparator?: (a: any, b: any) => number

    A custom comparator to use. This overrides all other options except reverse.

    identiticalResolver?: (a: Entity, b: Entity) => number

    A function to resolve order of entities with identical properties.

    reverse?: boolean

    Reverse the sort order.