@webdeveric/utils
    Preparing search index...

    Type Alias UniqueOptions<Type>

    type UniqueOptions<Type> = {
        filter?: (item: Type) => boolean;
        identity?: (item: Type) => unknown;
        store?: MembershipStore<unknown>;
    }

    Type Parameters

    • Type
    Index
    filter?: (item: Type) => boolean

    Return true to yield the item.

    identity?: (item: Type) => unknown

    Return a custom ID to uniquely identify an item.

    store?: MembershipStore<unknown>

    A store to keep track of which items have been seen.

    If you have a large dataset, you may want to use a more memory-efficient store than a Set, such as a Bloom filter.

    Set<unknown>.