All available filters.

interface Filters {
    regexObjectQuery: (
        accessors: string | Iterable<string>,
        options?: {
            accessWarn?: boolean;
            caseSensitive?: boolean;
            store?: MinimalWritable<string>;
        },
    ) => regexObjectQuery;
}

Properties

Properties

regexObjectQuery: (
    accessors: string | Iterable<string>,
    options?: {
        accessWarn?: boolean;
        caseSensitive?: boolean;
        store?: MinimalWritable<string>;
    },
) => regexObjectQuery

Creates a filter function to compare objects by a given accessor key against a regex test. The returned function is also a minimal writable Svelte store that builds a regex from the stores value.

Suitable for object reducers matching one or more property keys / accessors against the store value as a regex. To access deeper entries into the object format the accessor string with . between entries to walk.

This filter function can be used w/ a dynamic reducer and bound as a store to input elements.

Type declaration

    • (
          accessors: string | Iterable<string>,
          options?: {
              accessWarn?: boolean;
              caseSensitive?: boolean;
              store?: MinimalWritable<string>;
          },
      ): regexObjectQuery
    • Parameters

      • accessors: string | Iterable<string>

        Property key / accessors to lookup key to compare. To access deeper entries into the object format the accessor string with . between entries to walk.

      • Optionaloptions: {
            accessWarn?: boolean;
            caseSensitive?: boolean;
            store?: MinimalWritable<string>;
        }

        Optional parameters.

        • OptionalaccessWarn?: boolean

          When true warnings will be posted if accessor not retrieved; default: false.

        • OptionalcaseSensitive?: boolean

          When true regex test is case-sensitive; default: false.

        • Optionalstore?: MinimalWritable<string>

          Use the provided minimal writable store instead of creating a default writable store.

      Returns regexObjectQuery

      The query string filter.