LearnNewsExamplesServices
Frontmatter
id7940
titleFeat: Add Neo.snakeToCamel utility function
stateClosed
labels
enhancementairefactoring
assigneestobiu
createdAtNov 30, 2025, 12:19 AM
updatedAtNov 30, 2025, 12:26 AM
githubUrlhttps://github.com/neomjs/neo/issues/7940
authortobiu
commentsCount1
parentIssue7931
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 30, 2025, 12:26 AM

Feat: Add Neo.snakeToCamel utility function

Closed v11.14.0 enhancementairefactoring
tobiu
tobiu commented on Nov 30, 2025, 12:19 AM

To provide a dedicated and semantically clear utility for converting snake_case strings to camelCase, and to maintain consistency within the core framework''s naming conversion utilities (Neo.camel, Neo.decamel), a new snakeToCamel function will be introduced. This function will reside in src/core/Util.mjs and be borrowed into the global Neo object for easy access.

Deliverables

  1. Implement snakeToCamel in src/core/Util.mjs: Create a static utility method snakeToCamel(value) that converts a snake_case string to camelCase.
  2. Borrow into Neo object: Add Neo.core.Util.snakeToCamel as Neo.snakeToCamel in src/Neo.mjs.
  3. Update ai/mcp/client/Client.mjs: Refactor Neo.ai.mcp.client.Client to remove its internal snakeToCamel method and use the new Neo.snakeToCamel utility.
  4. Update JSDoc: Ensure all relevant JSDoc comments are updated to reflect the changes and proper usage.
tobiu assigned to @tobiu on Nov 30, 2025, 12:19 AM
tobiu added the enhancement label on Nov 30, 2025, 12:19 AM
tobiu added the ai label on Nov 30, 2025, 12:19 AM
tobiu added the refactoring label on Nov 30, 2025, 12:19 AM
tobiu added parent issue #7931 on Nov 30, 2025, 12:19 AM
tobiu referenced in commit 3af75f7 - "Feat: Add Neo.snakeToCamel utility function #7940" on Nov 30, 2025, 12:26 AM
tobiu
tobiu Nov 30, 2025, 12:26 AM

Input from Gemini 2.5:

✦ I have implemented the Neo.snakeToCamel utility function.

Deliverables Completed

  1. Implement snakeToCamel in src/core/Util.mjs: A static utility method snakeToCamel(value) has been added, converting snake_case strings to camelCase.
  2. Borrow into Neo object: Neo.core.Util.snakeToCamel is now aliased as Neo.snakeToCamel in src/Neo.mjs, making it globally accessible.
  3. Update ai/mcp/client/Client.mjs: The internal snakeToCamel method has been removed, and the Client now uses the new Neo.snakeToCamel utility for dynamic tool proxy creation.
  4. Update JSDoc: All relevant JSDoc comments have been updated.
tobiu closed this issue on Nov 30, 2025, 12:26 AM