Skip to content

Conversation

Copy link

Copilot AI commented Jan 23, 2026

Reorganizes functions in docs/syntax.md into logical groupings for easier navigation.

Changes

  • Pre-defined Functions now split into subsections:

    • Numeric Functions: random, fac, min, max, clamp, hypot, pyt, pow, atan2, roundTo
    • Array Functions: count, map, fold, filter, indexOf, join, naturalSort
    • Utility Functions: if, coalesce
  • Section naming standardized:

    • "String Manipulation Functions" → "String Functions"
    • "Object Manipulation Functions" → "Object Functions"
  • Removed duplicates: naturalSort and coalesce were listed in multiple sections

Original prompt

Rearrange all functions in docs/syntax.md. Create sections for numeric functions, string functions, array functions and object functions.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Sander-Toonen <5106372+Sander-Toonen@users.noreply.github.com>
Copilot AI changed the title [WIP] Rearrange functions in syntax documentation Reorganize docs/syntax.md functions into categorized sections Jan 23, 2026
Copilot AI requested a review from Sander-Toonen January 23, 2026 15:52
@Sander-Toonen Sander-Toonen marked this pull request as ready for review January 23, 2026 16:05
Copilot AI review requested due to automatic review settings January 23, 2026 16:05
@Sander-Toonen Sander-Toonen merged commit c9042c3 into master Jan 23, 2026
8 checks passed
Copy link

Copilot AI left a 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, and Utility Functions.
  • Standardized section titles: “String Manipulation Functions” → “String Functions”, “Object Manipulation Functions” → “Object Functions”.
  • Removed duplicate listings by relocating naturalSort and coalesce into 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"]`. |
Copy link

Copilot AI Jan 23, 2026

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).

Suggested change
| 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"]`. |

Copilot uses AI. Check for mistakes.
| 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
Copy link

Copilot AI Jan 23, 2026

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants