Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions content/docs/jexl/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: JEXL Extended Documentation
description: Complete guide to JEXL Extended across JavaScript, Python, and C# implementations
---

# JEXL Extended Documentation

Welcome to JEXL Extended, a powerful context-based expression parser and evaluator with 80+ built-in functions. Available in multiple programming languages with identical JEXL syntax.

## Available Implementations
Expand Down
68 changes: 34 additions & 34 deletions content/docs/jexl/reference/array/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,40 @@ Array operations and transformations

## Functions

- [`all`](./all): Checks whether the provided array has all elements that match the specified expression.
- [`any`](./any): Checks whether the provided array has any elements that match the specified expression.
- [`append`](./append): Appends elements to an array.
- [`distinct`](./distinct): Returns a new array with duplicate elements removed.
- [`filter`](./filter): Returns a new array with the elements of the input array that match the specified expression.
- [`find`](./find): Finds the first element in an array that matches the specified expression.
- [`findIndex`](./findIndex): Finds the index of the first element in the input array that satisfies the given Jexl expression.
- [`join`](./join): Joins elements of an array into a string.
- [`keys`](./keys): Returns the keys of an object as an array.
- [`map`](./map): Returns an array containing the results of applying the expression parameter to each value in the array parameter.
- [`mapField`](./mapField): Returns a new array with elements transformed by extracting a specific field.
- [`range`](./range): Returns a sub-array from start index to end index.
- [`reduce`](./reduce): Returns an aggregated value derived from applying the function parameter successively to each value in array in combination with the result of the previous application of the function.
- [`reverse`](./reverse): Reverses the elements of an array.
- [`shuffle`](./shuffle): Shuffles the elements of an array randomly.
- [`sort`](./sort): Sorts the elements of an array.
- [`toObject`](./toObject): Creates a new object based on key-value pairs or string keys.
- [`all`](./array/all): Checks whether the provided array has all elements that match the specified expression.
- [`any`](./array/any): Checks whether the provided array has any elements that match the specified expression.
- [`append`](./array/append): Appends elements to an array.
- [`distinct`](./array/distinct): Returns a new array with duplicate elements removed.
- [`filter`](./array/filter): Returns a new array with the elements of the input array that match the specified expression.
- [`find`](./array/find): Finds the first element in an array that matches the specified expression.
- [`findIndex`](./array/findIndex): Finds the index of the first element in the input array that satisfies the given Jexl expression.
- [`join`](./array/join): Joins elements of an array into a string.
- [`keys`](./array/keys): Returns the keys of an object as an array.
- [`map`](./array/map): Returns an array containing the results of applying the expression parameter to each value in the array parameter.
- [`mapField`](./array/mapField): Returns a new array with elements transformed by extracting a specific field.
- [`range`](./array/range): Returns a sub-array from start index to end index.
- [`reduce`](./array/reduce): Returns an aggregated value derived from applying the function parameter successively to each value in array in combination with the result of the previous application of the function.
- [`reverse`](./array/reverse): Reverses the elements of an array.
- [`shuffle`](./array/shuffle): Shuffles the elements of an array randomly.
- [`sort`](./array/sort): Sorts the elements of an array.
- [`toObject`](./array/toObject): Creates a new object based on key-value pairs or string keys.

## Transforms

- [`all`](./all): Checks whether the provided array has all elements that match the specified expression.
- [`any`](./any): Checks whether the provided array has any elements that match the specified expression.
- [`append`](./append): Appends elements to an array.
- [`distinct`](./distinct): Returns a new array with duplicate elements removed.
- [`filter`](./filter): Returns a new array with the elements of the input array that match the specified expression.
- [`find`](./find): Finds the first element in an array that matches the specified expression.
- [`findIndex`](./findIndex): Finds the index of the first element in the input array that satisfies the given Jexl expression.
- [`join`](./join): Joins elements of an array into a string.
- [`keys`](./keys): Returns the keys of an object as an array.
- [`map`](./map): Returns an array containing the results of applying the expression parameter to each value in the array parameter.
- [`mapField`](./mapField): Returns a new array with elements transformed by extracting a specific field.
- [`range`](./range): Returns a sub-array from start index to end index.
- [`reduce`](./reduce): Returns an aggregated value derived from applying the function parameter successively to each value in array in combination with the result of the previous application of the function.
- [`reverse`](./reverse): Reverses the elements of an array.
- [`shuffle`](./shuffle): Shuffles the elements of an array randomly.
- [`sort`](./sort): Sorts the elements of an array.
- [`toObject`](./toObject): Creates a new object based on key-value pairs or string keys.
- [`all`](./array/all): Checks whether the provided array has all elements that match the specified expression.
- [`any`](./array/any): Checks whether the provided array has any elements that match the specified expression.
- [`append`](./array/append): Appends elements to an array.
- [`distinct`](./array/distinct): Returns a new array with duplicate elements removed.
- [`filter`](./array/filter): Returns a new array with the elements of the input array that match the specified expression.
- [`find`](./array/find): Finds the first element in an array that matches the specified expression.
- [`findIndex`](./array/findIndex): Finds the index of the first element in the input array that satisfies the given Jexl expression.
- [`join`](./array/join): Joins elements of an array into a string.
- [`keys`](./array/keys): Returns the keys of an object as an array.
- [`map`](./array/map): Returns an array containing the results of applying the expression parameter to each value in the array parameter.
- [`mapField`](./array/mapField): Returns a new array with elements transformed by extracting a specific field.
- [`range`](./array/range): Returns a sub-array from start index to end index.
- [`reduce`](./array/reduce): Returns an aggregated value derived from applying the function parameter successively to each value in array in combination with the result of the previous application of the function.
- [`reverse`](./array/reverse): Reverses the elements of an array.
- [`shuffle`](./array/shuffle): Shuffles the elements of an array randomly.
- [`sort`](./array/sort): Sorts the elements of an array.
- [`toObject`](./array/toObject): Creates a new object based on key-value pairs or string keys.
32 changes: 16 additions & 16 deletions content/docs/jexl/reference/conversion/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ Convert between different data types

## Functions

- [`boolean`](./boolean): Converts the input to a boolean.
- [`formatBase`](./formatBase): Formats a number as a string in the specified base.
- [`formatInteger`](./formatInteger): Formats a number as an integer with zero padding.
- [`formatNumber`](./formatNumber): Formats a number to a decimal representation as specified by the format string.
- [`json`](./json): Parses the string and returns a JSON object.
- [`number`](./number): Converts the input to a number.
- [`parseInteger`](./parseInteger): Parses a string and returns an integer.
- [`string`](./string): Casts the input to a string.
- [`boolean`](./conversion/boolean): Converts the input to a boolean.
- [`formatBase`](./conversion/formatBase): Formats a number as a string in the specified base.
- [`formatInteger`](./conversion/formatInteger): Formats a number as an integer with zero padding.
- [`formatNumber`](./conversion/formatNumber): Formats a number to a decimal representation as specified by the format string.
- [`json`](./conversion/json): Parses the string and returns a JSON object.
- [`number`](./conversion/number): Converts the input to a number.
- [`parseInteger`](./conversion/parseInteger): Parses a string and returns an integer.
- [`string`](./conversion/string): Casts the input to a string.

## Transforms

- [`boolean`](./boolean): Converts the input to a boolean.
- [`formatBase`](./formatBase): Formats a number as a string in the specified base.
- [`formatInteger`](./formatInteger): Formats a number as an integer with zero padding.
- [`formatNumber`](./formatNumber): Formats a number to a decimal representation as specified by the format string.
- [`json`](./json): Parses the string and returns a JSON object.
- [`number`](./number): Converts the input to a number.
- [`parseInteger`](./parseInteger): Parses a string and returns an integer.
- [`string`](./string): Casts the input to a string.
- [`boolean`](./conversion/boolean): Converts the input to a boolean.
- [`formatBase`](./conversion/formatBase): Formats a number as a string in the specified base.
- [`formatInteger`](./conversion/formatInteger): Formats a number as an integer with zero padding.
- [`formatNumber`](./conversion/formatNumber): Formats a number to a decimal representation as specified by the format string.
- [`json`](./conversion/json): Parses the string and returns a JSON object.
- [`number`](./conversion/number): Converts the input to a number.
- [`parseInteger`](./conversion/parseInteger): Parses a string and returns an integer.
- [`string`](./conversion/string): Casts the input to a string.
8 changes: 6 additions & 2 deletions content/docs/jexl/reference/datetime/convertTimeZone.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ ISO datetime string with correct offset
## Examples

```javascript
convertTimeZone('2025-06-26T12:00:00Z', 'Europe/Amsterdam') // 2025-06-26T14:00:00.0000000+02:00
convertTimeZone(datetime, timezone)
```

```javascript
'2025-06-26T12:00:00Z'|convertTimeZone('Pacific Standard Time') // '2025-06-26T05:00:00.0000000-07:00'
$convertTimeZone(datetime, timezone)
```

```javascript
datetime|convertTimeZone(timezone)
```
26 changes: 12 additions & 14 deletions content/docs/jexl/reference/datetime/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ Date and time operations

## Functions

- [`convertTimeZone`](./convertTimeZone): Converts an ISO datetime string to a target timezone, handling daylight savings, and returns an ISO string with the correct offset.
- [`dateTimeAdd`](./dateTimeAdd): Adds a time range to a date and time in the ISO 8601 format.
- [`dateTimeFormat`](./dateTimeFormat): Converts a date and time to a provided format.
- [`dateTimeToMillis`](./dateTimeToMillis): Parses the date and time in the ISO 8601 format and returns the number of milliseconds since the Unix epoch.
- [`localTimeToIsoWithOffset`](./localTimeToIsoWithOffset): Converts a local time string in a specified timezone to an ISO datetime string with the correct offset.
- [`millis`](./millis): Returns the current date and time in milliseconds since the Unix epoch.
- [`millisToDateTime`](./millisToDateTime): Parses the number of milliseconds since the Unix epoch or parses a string (with or without specified format) and returns the date and time in the ISO 8601 format.
- [`now`](./now): Returns the current date and time in the ISO 8601 format.
- [`convertTimeZone`](./datetime/convertTimeZone): Converts an ISO datetime string to a target timezone, handling daylight savings, and returns an ISO string with the correct offset.
- [`dateTimeAdd`](./datetime/dateTimeAdd): Adds a time range to a date and time in the ISO 8601 format.
- [`dateTimeFormat`](./datetime/dateTimeFormat): Converts a date and time to a provided format.
- [`dateTimeToMillis`](./datetime/dateTimeToMillis): Parses the date and time in the ISO 8601 format and returns the number of milliseconds since the Unix epoch.
- [`millis`](./datetime/millis): Returns the current date and time in milliseconds since the Unix epoch.
- [`millisToDateTime`](./datetime/millisToDateTime): Parses the number of milliseconds since the Unix epoch or parses a string (with or without specified format) and returns the date and time in the ISO 8601 format.
- [`now`](./datetime/now): Returns the current date and time in the ISO 8601 format.

## Transforms

- [`convertTimeZone`](./convertTimeZone): Converts an ISO datetime string to a target timezone, handling daylight savings, and returns an ISO string with the correct offset.
- [`dateTimeAdd`](./dateTimeAdd): Adds a time range to a date and time in the ISO 8601 format.
- [`dateTimeFormat`](./dateTimeFormat): Converts a date and time to a provided format.
- [`dateTimeToMillis`](./dateTimeToMillis): Parses the date and time in the ISO 8601 format and returns the number of milliseconds since the Unix epoch.
- [`localTimeToIsoWithOffset`](./localTimeToIsoWithOffset): Converts a local time string in a specified timezone to an ISO datetime string with the correct offset.
- [`millisToDateTime`](./millisToDateTime): Parses the number of milliseconds since the Unix epoch or parses a string (with or without specified format) and returns the date and time in the ISO 8601 format.
- [`convertTimeZone`](./datetime/convertTimeZone): Converts an ISO datetime string to a target timezone, handling daylight savings, and returns an ISO string with the correct offset.
- [`dateTimeAdd`](./datetime/dateTimeAdd): Adds a time range to a date and time in the ISO 8601 format.
- [`dateTimeFormat`](./datetime/dateTimeFormat): Converts a date and time to a provided format.
- [`dateTimeToMillis`](./datetime/dateTimeToMillis): Parses the date and time in the ISO 8601 format and returns the number of milliseconds since the Unix epoch.
- [`millisToDateTime`](./datetime/millisToDateTime): Parses the number of milliseconds since the Unix epoch or parses a string (with or without specified format) and returns the date and time in the ISO 8601 format.
31 changes: 0 additions & 31 deletions content/docs/jexl/reference/datetime/localTimeToIsoWithOffset.mdx

This file was deleted.

12 changes: 6 additions & 6 deletions content/docs/jexl/reference/encoding/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Data encoding and formatting utilities

## Functions

- [`base64Decode`](./base64Decode): Decodes a Base64 encoded string.
- [`base64Encode`](./base64Encode): Encodes a string to Base64.
- [`formUrlEncoded`](./formUrlEncoded): Encodes a string or object to URI component format.
- [`base64Decode`](./encoding/base64Decode): Decodes a Base64 encoded string.
- [`base64Encode`](./encoding/base64Encode): Encodes a string to Base64.
- [`formUrlEncoded`](./encoding/formUrlEncoded): Encodes a string or object to URI component format.

## Transforms

- [`base64Decode`](./base64Decode): Decodes a Base64 encoded string.
- [`base64Encode`](./base64Encode): Encodes a string to Base64.
- [`formUrlEncoded`](./formUrlEncoded): Encodes a string or object to URI component format.
- [`base64Decode`](./encoding/base64Decode): Decodes a Base64 encoded string.
- [`base64Encode`](./encoding/base64Encode): Encodes a string to Base64.
- [`formUrlEncoded`](./encoding/formUrlEncoded): Encodes a string or object to URI component format.
2 changes: 1 addition & 1 deletion content/docs/jexl/reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ JEXL Extended provides over 80 built-in functions and transforms organized into
- [**Conversion**](./conversion): Convert between different data types (8 functions, 8 transforms)
- [**String**](./string): String manipulation and formatting functions (14 functions, 14 transforms)
- [**Utility**](./utility): General utility functions (6 functions, 5 transforms)
- [**DateTime**](./datetime): Date and time operations (8 functions, 6 transforms)
- [**DateTime**](./datetime): Date and time operations (7 functions, 5 transforms)
- [**Object**](./object): Object manipulation and inspection (3 functions, 3 transforms)

## Usage
Expand Down
42 changes: 21 additions & 21 deletions content/docs/jexl/reference/math/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ Mathematical operations and calculations

## Functions

- [`abs`](./abs): Returns the absolute value of a number.
- [`average`](./average): Calculates the average of an array of numbers.
- [`ceil`](./ceil): Rounds a number up to the nearest integer.
- [`floor`](./floor): Rounds a number down to the nearest integer.
- [`max`](./max): Finds the maximum value in an array of numbers.
- [`min`](./min): Finds the minimum value in an array of numbers.
- [`power`](./power): Returns the value of a number raised to a power.
- [`random`](./random): Generates a random number between 0 (inclusive) and 1 (exclusive).
- [`round`](./round): Rounds a number to the nearest integer or to specified decimal places.
- [`sqrt`](./sqrt): Returns the square root of a number.
- [`sum`](./sum): Calculates the sum of an array of numbers.
- [`abs`](./math/abs): Returns the absolute value of a number.
- [`average`](./math/average): Calculates the average of an array of numbers.
- [`ceil`](./math/ceil): Rounds a number up to the nearest integer.
- [`floor`](./math/floor): Rounds a number down to the nearest integer.
- [`max`](./math/max): Finds the maximum value in an array of numbers.
- [`min`](./math/min): Finds the minimum value in an array of numbers.
- [`power`](./math/power): Returns the value of a number raised to a power.
- [`random`](./math/random): Generates a random number between 0 (inclusive) and 1 (exclusive).
- [`round`](./math/round): Rounds a number to the nearest integer or to specified decimal places.
- [`sqrt`](./math/sqrt): Returns the square root of a number.
- [`sum`](./math/sum): Calculates the sum of an array of numbers.

## Transforms

- [`abs`](./abs): Returns the absolute value of a number.
- [`average`](./average): Calculates the average of an array of numbers.
- [`ceil`](./ceil): Rounds a number up to the nearest integer.
- [`floor`](./floor): Rounds a number down to the nearest integer.
- [`max`](./max): Finds the maximum value in an array of numbers.
- [`min`](./min): Finds the minimum value in an array of numbers.
- [`power`](./power): Returns the value of a number raised to a power.
- [`round`](./round): Rounds a number to the nearest integer or to specified decimal places.
- [`sqrt`](./sqrt): Returns the square root of a number.
- [`sum`](./sum): Calculates the sum of an array of numbers.
- [`abs`](./math/abs): Returns the absolute value of a number.
- [`average`](./math/average): Calculates the average of an array of numbers.
- [`ceil`](./math/ceil): Rounds a number up to the nearest integer.
- [`floor`](./math/floor): Rounds a number down to the nearest integer.
- [`max`](./math/max): Finds the maximum value in an array of numbers.
- [`min`](./math/min): Finds the minimum value in an array of numbers.
- [`power`](./math/power): Returns the value of a number raised to a power.
- [`round`](./math/round): Rounds a number to the nearest integer or to specified decimal places.
- [`sqrt`](./math/sqrt): Returns the square root of a number.
- [`sum`](./math/sum): Calculates the sum of an array of numbers.
Loading
Loading