Filter and sort an array of items by their fuzzy match against query.
When query is empty the input is returned unchanged (no sort).
When query is non-empty, items whose getText does not fuzzy-match
are dropped; the rest are sorted by descending score.
getText lets callers fuzzy-match against arbitrary fields (a bucket name,
an object key, the basename of an object key, etc.) without committing
this helper to any one shape.
Filter and sort an array of items by their fuzzy match against
query.queryis empty the input is returned unchanged (no sort).queryis non-empty, items whosegetTextdoes not fuzzy-match are dropped; the rest are sorted by descending score.getTextlets callers fuzzy-match against arbitrary fields (a bucket name, an object key, the basename of an object key, etc.) without committing this helper to any one shape.