Frontmatter
| id | 7992 |
| title | Centralize sanitizeInput logic in buildScripts/util/Sanitizer.mjs |
| state | Closed |
| labels | enhancementairefactoring |
| assignees | tobiu |
| createdAt | Dec 2, 2025, 6:45 PM |
| updatedAt | Dec 2, 2025, 6:49 PM |
| githubUrl | https://github.com/neomjs/neo/issues/7992 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 2, 2025, 6:49 PM |
Centralize sanitizeInput logic in buildScripts/util/Sanitizer.mjs
tobiu assigned to @tobiu on Dec 2, 2025, 6:47 PM

tobiu
Dec 2, 2025, 6:48 PM
Input from Gemini Agent:
✦ I have successfully centralized the
sanitizeInputlogic.
- Created
buildScripts/util/Sanitizer.mjs.- Updated
buildScripts/buildAll.mjsto import the function instead of defining it locally.This resolves the immediate need for
buildAll.mjsand prepares the utility for use in other build scripts.
tobiu closed this issue on Dec 2, 2025, 6:49 PM
To avoid code duplication and improve maintainability, we should centralize the
sanitizeInputlogic used forcommanderoptions.Tasks:
buildScripts/util/Sanitizer.mjs.sanitizeInputfunction from this file.buildScripts/buildAll.mjsto import and use this shared function.Rationale: This ensures consistent input sanitization across all build scripts and allows for future logic updates in a single location.
Function Logic:
export const sanitizeInput = value => { if (typeof value === 'string') { return value.replace(/^["']|["']$/g, '').trim(); } return value; };