-
Notifications
You must be signed in to change notification settings - Fork 1
Reorganize docs/syntax.md functions into categorized sections #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Sander-Toonen <5106372+Sander-Toonen@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Reorganizes docs/syntax.md to make built-in functions easier to find by grouping them into clearer categories and standardizing section names.
Changes:
- Split “Pre-defined Functions” into
Numeric Functions,Array Functions, andUtility Functions. - Standardized section titles: “String Manipulation Functions” → “String Functions”, “Object Manipulation Functions” → “Object Functions”.
- Removed duplicate listings by relocating
naturalSortandcoalesceinto single, appropriate sections.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | filter(f, a) | Array filter: Return an array containing only the values from `a` where `f(x, index)` is `true`. | | ||
| | indexOf(x, a) | Return the first index of string or array `a` matching the value `x`, or `-1` if not found. | | ||
| | join(sep, a) | Concatenate the elements of `a`, separated by `sep`. | | ||
| | naturalSort(arr) | Sorts an array of strings using natural sort order (alphanumeric-aware). For example, `["file10", "file2", "file1"]` becomes `["file1", "file2", "file10"]`. | |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naturalSort is listed under Array Functions but uses a different parameter name (arr) than the rest of this section (a). For consistency with the other signatures (count/map/fold/filter/indexOf/join), consider renaming the signature here to naturalSort(a) (or standardize the whole section on arr).
| | naturalSort(arr) | Sorts an array of strings using natural sort order (alphanumeric-aware). For example, `["file10", "file2", "file1"]` becomes `["file1", "file2", "file10"]`. | | |
| | naturalSort(a) | Sorts an array of strings using natural sort order (alphanumeric-aware). For example, `["file10", "file2", "file1"]` becomes `["file1", "file2", "file10"]`. | |
| | coalesce(a, b, ...) | Returns the first non-null and non-empty string value from the arguments. Numbers and booleans (including 0 and false) are considered valid values. | | ||
|
|
||
| ## String Manipulation Functions | ||
| ## String Functions |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After moving naturalSort and coalesce out of the String Functions list, the “String Function Examples” section still includes examples for both (naturalSort at ~246 and coalesce at ~272). This makes the section misleading and may also make the subsequent note about “All string functions…” ambiguous. Consider moving those examples to the relevant Pre-defined subsections (Array/Utility) or renaming/restructuring the examples section so it only contains string functions.
Reorganizes functions in
docs/syntax.mdinto logical groupings for easier navigation.Changes
Pre-defined Functions now split into subsections:
random,fac,min,max,clamp,hypot,pyt,pow,atan2,roundTocount,map,fold,filter,indexOf,join,naturalSortif,coalesceSection naming standardized:
Removed duplicates:
naturalSortandcoalescewere listed in multiple sectionsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.