Interface FilterAPI
regexObjectQuery: (
paths: PropertyPath | Iterable<PropertyPath, any, any>,
options?: {
accessWarn?: boolean;
caseSensitive?: boolean;
store?: MinimalWritable<string>;
},
) => regexObjectQuery;
}
Properties
regexObjectQuery
paths: PropertyPath | Iterable<PropertyPath, any, any>,
options?: {
accessWarn?: boolean;
caseSensitive?: boolean;
store?: MinimalWritable<string>;
},
) => regexObjectQuery
Creates a filter function to compare objects by a given property path or list of paths against a regex test. The property path must return a string for this filter to process. 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 paths against the store value as a
regex. To access deeper entries into the object format the path as a dotted string with . between entries to
walk or as a PropertyKey array.
This filter function can be used w/ a dynamic reducer and bound as a store to input elements.
Note: To specify multiple dotted string paths in an iterable manner you must wrap them in a Set or use an array of property-key arrays.
Type Declaration
-
- (
paths: PropertyPath | Iterable<PropertyPath, any, any>,
options?: {
accessWarn?: boolean;
caseSensitive?: boolean;
store?: MinimalWritable<string>;
},
): regexObjectQuery -
Parameters
- paths: PropertyPath | Iterable<PropertyPath, any, any>
Property paths to lookup key to compare. To access deeper entries into the object format the paths as a dotted between entries to walk or use a PropertyKey array.
Optionaloptions: {
accessWarn?: boolean;
caseSensitive?: boolean;
store?: MinimalWritable<string>;
}Optional parameters.
-
OptionalaccessWarn?: booleanWhen true warnings will be posted if accessor not retrieved; default:
false. -
OptionalcaseSensitive?: booleanWhen true regex test is case-sensitive; default:
false. -
Optionalstore?: MinimalWritable<string>Use the provided minimal writable store instead of creating a default
writablestore.
-
Returns regexObjectQuery
The query string filter.
- paths: PropertyPath | Iterable<PropertyPath, any, any>
- (
All available filters.