To support advanced filtering scenarios, such as excluding certain classes from the Docs app tree view (e.g., Neo.ai classes that are not real source code), we need a doesNotStartWith operator in Neo.collection.Filter.
Currently, Neo.collection.Filter supports startsWith, but lacks the inverse operation.
Goal
Add doesNotStartWith to the operators static array and implement the corresponding static method in Neo.collection.Filter.
Implementation Details
- Add
'doesNotStartWith' to Neo.collection.Filter.operators.
- Implement
static ['doesNotStartWith'](a, b) logic.
- It should return
true if string a does not start with string b.
- Should handle non-string inputs gracefully (e.g., coerce to string or return safe default).
- Should likely be case-insensitive to match
startsWith behavior (check startsWith implementation for consistency).
Example Usage
store.filter({
property: 'className',
operator: 'doesNotStartWith',
value: 'Neo.ai'
});
To support advanced filtering scenarios, such as excluding certain classes from the Docs app tree view (e.g.,
Neo.aiclasses that are not real source code), we need adoesNotStartWithoperator inNeo.collection.Filter.Currently,
Neo.collection.FiltersupportsstartsWith, but lacks the inverse operation.Goal
Add
doesNotStartWithto theoperatorsstatic array and implement the corresponding static method inNeo.collection.Filter.Implementation Details
'doesNotStartWith'toNeo.collection.Filter.operators.static ['doesNotStartWith'](a, b)logic.trueif stringadoes not start with stringb.startsWithbehavior (checkstartsWithimplementation for consistency).Example Usage
// Filter out items that start with 'Neo.ai' store.filter({ property: 'className', operator: 'doesNotStartWith', value: 'Neo.ai' });