Selectors API
A collection of helper functions to get a subset of keys for a set of objects. Typically used by select.
#
containsReturns all keys that contain the specified substring.
#
Parameterssubstring
#
The substring that must exist in the keys.
ignoreCase
#
If true, matches without considering whether letters are upper or lower case (default: true).
#
Usage#
endsWithReturns all keys that end with the specified substring.
#
Parameterssuffix
#
The suffix that must exist in the keys.
ignoreCase
#
If true, matches without considering whether letters are upper or lower case (default: true).
#
Usage#
everythingReturns all keys for items in the collection. It is naive and looks only at the first element in the collection.
#
Usage#
matchesReturns all keys that start with the specified substring.
#
Parametersregex
#
The regular expression used to match keys against. You must provide the i
flag to have case ignored.
#
Usage#
negateConverts the output of any given selector(s) to be prefixed with -
, so when combined with select, those keys are dropped.
#
Parametersselectors
#
Single or array of selector keys or functions.
#
Usage#
numRangeReturns all keys that start with the specified substring combined with a numerical suffix within a specified range.
#
Parametersprefix
#
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#
startsWithReturns all keys that start with the specified substring.
#
Parametersprefix
#
The prefix that must exist in the keys.
ignoreCase
#
If true, matches without considering whether letters are upper or lower case (default: true).