Selectors API
A collection of helper functions to get a subset of keys for a set of objects. Typically used by select.
contains#
Returns all keys that contain the specified substring.
Parameters#
substring#
The substring that must exist in the keys.
ignoreCase#
If true, matches without considering whether letters are upper or lower case (default: true).
Usage#
endsWith#
Returns all keys that end with the specified substring.
Parameters#
suffix#
The suffix that must exist in the keys.
ignoreCase#
If true, matches without considering whether letters are upper or lower case (default: true).
Usage#
everything#
Returns all keys for items in the collection. It is naive and looks only at the first element in the collection.
Usage#
matches#
Returns all keys that start with the specified substring.
Parameters#
regex#
The regular expression used to match keys against. You must provide the i flag to have case ignored.
Usage#
negate#
Converts the output of any given selector(s) to be prefixed with -, so when combined with select, those keys are dropped.
Parameters#
selectors#
Single or array of selector keys or functions.
Usage#
numRange#
Returns all keys that start with the specified substring combined with a numerical suffix within a specified range.
Parameters#
prefix#
The prefix for the keys that will have the numbers appended to.
range#
The [min, max] numbers to generate the keys over.
width?#
How many leading zeroes the numbers should have, defaults to none.
Usage#
startsWith#
Returns all keys that start with the specified substring.
Parameters#
prefix#
The prefix that must exist in the keys.
ignoreCase#
If true, matches without considering whether letters are upper or lower case (default: true).