Jyro 0.1.5 Released with REST API Support
We're excited to announce Jyro 0.1.5, bringing enhanced developer ergonomics, experimental REST API capabilities, and expanded array functionality. You can download the new package on NuGet.
Underscore-Prefixed Identifiers
Jyro now supports identifiers that begin with an underscore character, aligning with common programming conventions for denoting private or internal variables. You can now use naming patterns like _private, _temp, __internal, or even a single underscore _ for throwaway values. This enhancement provides greater flexibility in expressing intent through variable naming, making it easier to distinguish between public-facing and internal implementation details in your scripts.
InvokeRestMethod Function (Experimental)
The new InvokeRestMethod function brings REST API integration capabilities to Jyro, enabling scripts to communicate with external web services directly. This experimental feature supports all standard HTTP methods (GET, POST, PUT, PATCH, DELETE) with comprehensive control over headers, authentication, timeouts, and request body formatting. The function returns a structured response object containing the HTTP status code, headers, and parsed body content. Whether you're fetching data from a web service or implementing webhook callbacks, InvokeRestMethod provides the foundation for building connected Jyro applications.
The InvokeRestMethod must be explicitly opted in by the host using the WithRestApi() extension method in the builder.
IndexOf Function
The standard library now includes the IndexOf function, which searches an array and returns the zero-based index of the first element matching a specified value, or -1 if not found. What makes this function powerful is its use of deep equality comparison—it can accurately find complex objects and nested arrays by comparing their contents rather than references. For example, you can search an array of order objects by providing an object literal with matching properties. This is especially useful when combined with RemoveAt to delete items based on their content rather than their position.