LearnNewsExamplesServices
Frontmatter
id7898
titleAdd 'doesNotStartWith' operator to Neo.collection.Filter
stateClosed
labels
enhancementai
assigneestobiu
createdAtNov 24, 2025, 2:35 PM
updatedAtNov 24, 2025, 2:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/7898
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 24, 2025, 2:38 PM

Add 'doesNotStartWith' operator to Neo.collection.Filter

Closed v11.10.0 enhancementai
tobiu
tobiu commented on Nov 24, 2025, 2:35 PM

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

  1. Add 'doesNotStartWith' to Neo.collection.Filter.operators.
  2. 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

// Filter out items that start with 'Neo.ai'
store.filter({
    property: 'className',
    operator: 'doesNotStartWith',
    value: 'Neo.ai'
});
tobiu added the enhancement label on Nov 24, 2025, 2:35 PM
tobiu assigned to @tobiu on Nov 24, 2025, 2:35 PM
tobiu added the ai label on Nov 24, 2025, 2:35 PM
tobiu referenced in commit 55dad0c - "Add 'doesNotStartWith' operator to Neo.collection.Filter #7898" on Nov 24, 2025, 2:38 PM
tobiu closed this issue on Nov 24, 2025, 2:38 PM