fable 3.1.51 → 3.1.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +87 -2
  2. package/dist/fable.js +21 -12
  3. package/dist/fable.js.map +1 -1
  4. package/dist/fable.min.js +2 -2
  5. package/dist/fable.min.js.map +1 -1
  6. package/docs/.nojekyll +0 -0
  7. package/docs/README.md +95 -0
  8. package/docs/_sidebar.md +42 -0
  9. package/docs/architecture.md +326 -0
  10. package/docs/cover.md +11 -0
  11. package/docs/index.html +51 -0
  12. package/docs/services/README.md +76 -0
  13. package/docs/services/anticipate.md +331 -0
  14. package/docs/services/csv-parser.md +152 -0
  15. package/docs/services/data-format.md +277 -0
  16. package/docs/services/data-generation.md +142 -0
  17. package/docs/services/dates.md +216 -0
  18. package/docs/services/environment-data.md +44 -0
  19. package/docs/services/expression-parser-functions/README.md +178 -0
  20. package/docs/services/expression-parser-functions/abs.md +84 -0
  21. package/docs/services/expression-parser-functions/aggregationhistogram.md +83 -0
  22. package/docs/services/expression-parser-functions/aggregationhistogrambyobject.md +64 -0
  23. package/docs/services/expression-parser-functions/arrayconcat.md +64 -0
  24. package/docs/services/expression-parser-functions/avg.md +81 -0
  25. package/docs/services/expression-parser-functions/bucketset.md +69 -0
  26. package/docs/services/expression-parser-functions/ceil.md +70 -0
  27. package/docs/services/expression-parser-functions/cleanvaluearray.md +66 -0
  28. package/docs/services/expression-parser-functions/cleanvalueobject.md +68 -0
  29. package/docs/services/expression-parser-functions/compare.md +72 -0
  30. package/docs/services/expression-parser-functions/concat.md +73 -0
  31. package/docs/services/expression-parser-functions/concatraw.md +73 -0
  32. package/docs/services/expression-parser-functions/cos.md +75 -0
  33. package/docs/services/expression-parser-functions/count.md +73 -0
  34. package/docs/services/expression-parser-functions/countset.md +65 -0
  35. package/docs/services/expression-parser-functions/countsetelements.md +63 -0
  36. package/docs/services/expression-parser-functions/createarrayfromabsolutevalues.md +63 -0
  37. package/docs/services/expression-parser-functions/createvalueobjectbyhashes.md +69 -0
  38. package/docs/services/expression-parser-functions/cumulativesummation.md +96 -0
  39. package/docs/services/expression-parser-functions/dateadddays.md +79 -0
  40. package/docs/services/expression-parser-functions/dateaddhours.md +74 -0
  41. package/docs/services/expression-parser-functions/dateaddmilliseconds.md +65 -0
  42. package/docs/services/expression-parser-functions/dateaddminutes.md +72 -0
  43. package/docs/services/expression-parser-functions/dateaddmonths.md +74 -0
  44. package/docs/services/expression-parser-functions/dateaddseconds.md +66 -0
  45. package/docs/services/expression-parser-functions/dateaddweeks.md +73 -0
  46. package/docs/services/expression-parser-functions/dateaddyears.md +74 -0
  47. package/docs/services/expression-parser-functions/datedaydifference.md +84 -0
  48. package/docs/services/expression-parser-functions/datefromparts.md +81 -0
  49. package/docs/services/expression-parser-functions/datehourdifference.md +64 -0
  50. package/docs/services/expression-parser-functions/datemathadd.md +72 -0
  51. package/docs/services/expression-parser-functions/datemilliseconddifference.md +64 -0
  52. package/docs/services/expression-parser-functions/dateminutedifference.md +64 -0
  53. package/docs/services/expression-parser-functions/datemonthdifference.md +66 -0
  54. package/docs/services/expression-parser-functions/dateseconddifference.md +64 -0
  55. package/docs/services/expression-parser-functions/dateweekdifference.md +65 -0
  56. package/docs/services/expression-parser-functions/dateyeardifference.md +64 -0
  57. package/docs/services/expression-parser-functions/distributionhistogram.md +96 -0
  58. package/docs/services/expression-parser-functions/distributionhistogrambyobject.md +64 -0
  59. package/docs/services/expression-parser-functions/entryinset.md +72 -0
  60. package/docs/services/expression-parser-functions/euler.md +77 -0
  61. package/docs/services/expression-parser-functions/exp.md +74 -0
  62. package/docs/services/expression-parser-functions/findfirstvaluebyexactmatch.md +67 -0
  63. package/docs/services/expression-parser-functions/findfirstvaluebystringincludes.md +67 -0
  64. package/docs/services/expression-parser-functions/flatten.md +76 -0
  65. package/docs/services/expression-parser-functions/floor.md +70 -0
  66. package/docs/services/expression-parser-functions/gaussianelimination.md +75 -0
  67. package/docs/services/expression-parser-functions/generatearrayofobjectsfromsets.md +70 -0
  68. package/docs/services/expression-parser-functions/getvalue.md +90 -0
  69. package/docs/services/expression-parser-functions/getvaluearray.md +64 -0
  70. package/docs/services/expression-parser-functions/getvalueobject.md +67 -0
  71. package/docs/services/expression-parser-functions/if.md +109 -0
  72. package/docs/services/expression-parser-functions/iterativeseries.md +107 -0
  73. package/docs/services/expression-parser-functions/join.md +75 -0
  74. package/docs/services/expression-parser-functions/joinraw.md +64 -0
  75. package/docs/services/expression-parser-functions/largestinset.md +63 -0
  76. package/docs/services/expression-parser-functions/leastsquares.md +66 -0
  77. package/docs/services/expression-parser-functions/linest.md +58 -0
  78. package/docs/services/expression-parser-functions/log.md +74 -0
  79. package/docs/services/expression-parser-functions/match.md +71 -0
  80. package/docs/services/expression-parser-functions/matrixinverse.md +67 -0
  81. package/docs/services/expression-parser-functions/matrixmultiply.md +71 -0
  82. package/docs/services/expression-parser-functions/matrixtranspose.md +72 -0
  83. package/docs/services/expression-parser-functions/matrixvectormultiply.md +69 -0
  84. package/docs/services/expression-parser-functions/max.md +73 -0
  85. package/docs/services/expression-parser-functions/mean.md +63 -0
  86. package/docs/services/expression-parser-functions/median.md +79 -0
  87. package/docs/services/expression-parser-functions/min.md +73 -0
  88. package/docs/services/expression-parser-functions/mode.md +66 -0
  89. package/docs/services/expression-parser-functions/objectkeystoarray.md +66 -0
  90. package/docs/services/expression-parser-functions/objectvaluessortbyexternalobjectarray.md +65 -0
  91. package/docs/services/expression-parser-functions/objectvaluestoarray.md +67 -0
  92. package/docs/services/expression-parser-functions/percent.md +75 -0
  93. package/docs/services/expression-parser-functions/pi.md +77 -0
  94. package/docs/services/expression-parser-functions/polynomialregression.md +69 -0
  95. package/docs/services/expression-parser-functions/predict.md +71 -0
  96. package/docs/services/expression-parser-functions/rad.md +85 -0
  97. package/docs/services/expression-parser-functions/randomfloat.md +63 -0
  98. package/docs/services/expression-parser-functions/randomfloatbetween.md +72 -0
  99. package/docs/services/expression-parser-functions/randomfloatupto.md +65 -0
  100. package/docs/services/expression-parser-functions/randominteger.md +56 -0
  101. package/docs/services/expression-parser-functions/randomintegerbetween.md +72 -0
  102. package/docs/services/expression-parser-functions/randomintegerupto.md +64 -0
  103. package/docs/services/expression-parser-functions/resolvehtmlentities.md +64 -0
  104. package/docs/services/expression-parser-functions/round.md +111 -0
  105. package/docs/services/expression-parser-functions/setconcatenate.md +64 -0
  106. package/docs/services/expression-parser-functions/sin.md +83 -0
  107. package/docs/services/expression-parser-functions/slice.md +80 -0
  108. package/docs/services/expression-parser-functions/smallestinset.md +63 -0
  109. package/docs/services/expression-parser-functions/sorthistogram.md +70 -0
  110. package/docs/services/expression-parser-functions/sorthistogrambykeys.md +69 -0
  111. package/docs/services/expression-parser-functions/sortset.md +75 -0
  112. package/docs/services/expression-parser-functions/sqrt.md +85 -0
  113. package/docs/services/expression-parser-functions/stdev.md +81 -0
  114. package/docs/services/expression-parser-functions/stdeva.md +58 -0
  115. package/docs/services/expression-parser-functions/stdevp.md +83 -0
  116. package/docs/services/expression-parser-functions/stringcountsegments.md +66 -0
  117. package/docs/services/expression-parser-functions/stringgetsegments.md +74 -0
  118. package/docs/services/expression-parser-functions/subtractingsummation.md +66 -0
  119. package/docs/services/expression-parser-functions/sum.md +78 -0
  120. package/docs/services/expression-parser-functions/tan.md +78 -0
  121. package/docs/services/expression-parser-functions/tofixed.md +75 -0
  122. package/docs/services/expression-parser-functions/var.md +67 -0
  123. package/docs/services/expression-parser-functions/vara.md +58 -0
  124. package/docs/services/expression-parser-functions/varp.md +66 -0
  125. package/docs/services/expression-parser-functions/when.md +98 -0
  126. package/docs/services/expression-parser.md +314 -0
  127. package/docs/services/file-persistence.md +279 -0
  128. package/docs/services/logging.md +237 -0
  129. package/docs/services/logic.md +166 -0
  130. package/docs/services/manifest.md +256 -0
  131. package/docs/services/math.md +279 -0
  132. package/docs/services/meta-template.md +268 -0
  133. package/docs/services/object-cache.md +171 -0
  134. package/docs/services/operation.md +207 -0
  135. package/docs/services/progress-time.md +167 -0
  136. package/docs/services/progress-tracker-set.md +222 -0
  137. package/docs/services/rest-client.md +296 -0
  138. package/docs/services/settings-manager.md +265 -0
  139. package/docs/services/template.md +233 -0
  140. package/docs/services/utility.md +304 -0
  141. package/docs/services/uuid.md +162 -0
  142. package/package.json +2 -2
  143. package/source/services/Fable-Service-DataFormat.js +1 -0
  144. package/source/services/Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js +6 -4
  145. package/test/ExpressionParser_tests.js +3 -0
@@ -0,0 +1,64 @@
1
+ # dateyeardifference
2
+
3
+ Calculates the difference between two dates in years.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ dateyeardifference(startDate, endDate)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `startDate` | String | Start date (ISO 8601 format) |
16
+ | `endDate` | String | End date (ISO 8601 format) |
17
+
18
+ ## Returns
19
+
20
+ String - The number of years between the two dates.
21
+
22
+ ## Description
23
+
24
+ The `dateyeardifference` function calculates how many years have elapsed between two dates. The result is positive when endDate is after startDate, and negative otherwise.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = DATEYEARDIFFERENCE("2020-01-01T00:00:00.000Z", "2025-01-01T00:00:00.000Z")
32
+ // Result: "5"
33
+ ```
34
+
35
+ ### Age Calculation
36
+
37
+ ```expression
38
+ Age = DATEYEARDIFFERENCE(BirthDate, Today)
39
+ ```
40
+
41
+ ### Contract Duration
42
+
43
+ ```expression
44
+ ContractYears = DATEYEARDIFFERENCE(StartDate, EndDate)
45
+ ```
46
+
47
+ ## Use Cases
48
+
49
+ - **Age calculation**: Calculate age in years
50
+ - **Anniversary**: Years since event
51
+ - **Contracts**: Multi-year contract terms
52
+ - **Experience**: Years of service
53
+
54
+ ## Related Functions
55
+
56
+ - [datedaydifference](./datedaydifference.md) - Difference in days
57
+ - [datemonthdifference](./datemonthdifference.md) - Difference in months
58
+ - [dateaddyears](./dateaddyears.md) - Add years to a date
59
+
60
+ ## Notes
61
+
62
+ - Uses ISO 8601 date format
63
+ - Result can be negative
64
+ - Uses the Dates service internally
@@ -0,0 +1,96 @@
1
+ # distributionhistogram
2
+
3
+ Generates a histogram counting occurrences of each unique value.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ distributionhistogram(dataPath, keyProperty)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `dataPath` | String | Path to the data array (quoted string) |
16
+ | `keyProperty` | String | Property name to count occurrences of |
17
+
18
+ ## Returns
19
+
20
+ Object - A histogram object with unique values and their counts.
21
+
22
+ ## Description
23
+
24
+ The `distributionhistogram` function creates a histogram by counting how many times each unique value appears in a dataset. This is useful for understanding the distribution of categorical data.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ // Given city data with a 'state' property
32
+ DistributionResult = distributionhistogram("AppData.Cities", "state")
33
+
34
+ // Result: {
35
+ // 'Alabama': 12,
36
+ // 'Colorado': 21,
37
+ // 'Florida': 73,
38
+ // 'Georgia': 18,
39
+ // // ... etc
40
+ // }
41
+ ```
42
+
43
+ ### Counting Categories
44
+
45
+ ```expression
46
+ // Count orders by status
47
+ StatusCounts = distributionhistogram("AppData.Orders", "status")
48
+ // Result: { 'pending': 45, 'shipped': 123, 'delivered': 89 }
49
+ ```
50
+
51
+ ### With Verification
52
+
53
+ ```expression
54
+ // Verify distribution counts match data
55
+ DistributionResult = distributionhistogram("AppData.Cities", "state")
56
+ // DistributionResult.Alabama should equal 12
57
+ // DistributionResult.Colorado should equal 21
58
+ ```
59
+
60
+ ## Use Cases
61
+
62
+ - **Demographic analysis**: Count people by category
63
+ - **Survey results**: Tally responses
64
+ - **Quality metrics**: Distribution of defect types
65
+ - **Inventory**: Count items by category
66
+ - **Geographic analysis**: Records per region
67
+
68
+ ## Difference from aggregationhistogram
69
+
70
+ | distributionhistogram | aggregationhistogram |
71
+ |----------------------|---------------------|
72
+ | Counts occurrences | Sums values |
73
+ | One property (key) | Two properties (key, value) |
74
+ | Result: counts | Result: sums |
75
+
76
+ ```expression
77
+ // Distribution: How many cities per state?
78
+ distributionhistogram("AppData.Cities", "state")
79
+ // { 'California': 73, 'Texas': 51, ... }
80
+
81
+ // Aggregation: Total population per state?
82
+ aggregationhistogram("AppData.Cities", "state", "population")
83
+ // { 'California': '39538223', 'Texas': '29145505', ... }
84
+ ```
85
+
86
+ ## Related Functions
87
+
88
+ - [distributionhistogrambyobject](./distributionhistogrambyobject.md) - Takes object directly
89
+ - [aggregationhistogram](./aggregationhistogram.md) - Sum values instead of count
90
+ - [count](./count.md) - Simple count of elements
91
+
92
+ ## Notes
93
+
94
+ - The data path must be a quoted string
95
+ - Returns integer counts for each unique value
96
+ - Works with the Math service's `histogramDistributionByExactValueFromInternalState` method
@@ -0,0 +1,64 @@
1
+ # distributionhistogrambyobject
2
+
3
+ Generates a distribution histogram from an object directly.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ distributionhistogrambyobject(object, keyProperty)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `object` | Array | Array of objects to count |
16
+ | `keyProperty` | String | Property name to count occurrences of |
17
+
18
+ ## Returns
19
+
20
+ Object - A histogram object with unique values and their counts.
21
+
22
+ ## Description
23
+
24
+ The `distributionhistogrambyobject` function is similar to `distributionhistogram` but takes an object/array directly instead of a data path string. This is useful when working with data that's already in a variable.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ // Given array of order data
32
+ Orders = [
33
+ { id: 1, status: 'pending' },
34
+ { id: 2, status: 'shipped' },
35
+ { id: 3, status: 'pending' },
36
+ { id: 4, status: 'delivered' }
37
+ ]
38
+
39
+ Result = DISTRIBUTIONHISTOGRAMBYOBJECT(Orders, "status")
40
+ // Result: { 'pending': 2, 'shipped': 1, 'delivered': 1 }
41
+ ```
42
+
43
+ ### With Filtered Data
44
+
45
+ ```expression
46
+ CategoryCounts = DISTRIBUTIONHISTOGRAMBYOBJECT(FilteredProducts, "category")
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Dynamic data**: Count data already in variables
52
+ - **Filtered data**: Count after filtering
53
+ - **Chained operations**: Use in expression chains
54
+
55
+ ## Related Functions
56
+
57
+ - [distributionhistogram](./distributionhistogram.md) - Uses data path string
58
+ - [aggregationhistogrambyobject](./aggregationhistogrambyobject.md) - Sum by object
59
+ - [count](./count.md) - Simple count
60
+
61
+ ## Notes
62
+
63
+ - Takes array directly, not path string
64
+ - Uses the Math service's `histogramDistributionByExactValue` method
@@ -0,0 +1,72 @@
1
+ # entryinset
2
+
3
+ Checks if a value exists in a set/array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ entryinset(value, set)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `value` | Any | The value to search for |
16
+ | `set` | Array | The array to search in |
17
+
18
+ ## Returns
19
+
20
+ Boolean - True if the value exists in the set, false otherwise.
21
+
22
+ ## Description
23
+
24
+ The `entryinset` function checks whether a specific value exists within an array or set. This is useful for membership testing and validation.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = ENTRYINSET(3, [1, 2, 3, 4, 5])
32
+ // Result: true
33
+ ```
34
+
35
+ ### Not Found
36
+
37
+ ```expression
38
+ Result = ENTRYINSET(10, [1, 2, 3, 4, 5])
39
+ // Result: false
40
+ ```
41
+
42
+ ### With Variables
43
+
44
+ ```expression
45
+ IsValidStatus = ENTRYINSET(OrderStatus, ["pending", "shipped", "delivered"])
46
+ ```
47
+
48
+ ### Validation
49
+
50
+ ```expression
51
+ IsAllowedCategory = ENTRYINSET(Category, AllowedCategories)
52
+ ```
53
+
54
+ ## Use Cases
55
+
56
+ - **Validation**: Check if value is allowed
57
+ - **Filtering**: Conditional processing
58
+ - **Membership**: Check set membership
59
+ - **Logic**: Conditional branching
60
+
61
+ ## Related Functions
62
+
63
+ - [findfirstvaluebyexactmatch](./findfirstvaluebyexactmatch.md) - Find value in array
64
+ - [if](./if.md) - Use with conditional logic
65
+ - [when](./when.md) - Conditional expression
66
+
67
+ ## Notes
68
+
69
+ - Returns boolean (true/false)
70
+ - Uses exact matching
71
+ - Case-sensitive for strings
72
+ - Uses the Math service's `entryInSet` method
@@ -0,0 +1,77 @@
1
+ # euler
2
+
3
+ Returns Euler's number (e) with high precision.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ euler()
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ None.
14
+
15
+ ## Returns
16
+
17
+ String - Euler's number (e) to 100 decimal places.
18
+
19
+ ## Description
20
+
21
+ The `euler` function returns Euler's number (e ≈ 2.71828...), which is the base of natural logarithms. It's one of the most important constants in mathematics and appears in many areas including calculus, probability, and physics.
22
+
23
+ ## Examples
24
+
25
+ ### Basic Usage
26
+
27
+ ```expression
28
+ Result = euler()
29
+ // Result: "2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274..."
30
+ ```
31
+
32
+ ### Exponential Growth
33
+
34
+ ```expression
35
+ // Compound interest with continuous compounding
36
+ // A = P * e^(rt)
37
+ FinalAmount = Principal * euler()^(Rate * Time)
38
+ ```
39
+
40
+ ### Natural Logarithm Calculations
41
+
42
+ ```expression
43
+ // e^x where x = 1
44
+ Result = euler()^1
45
+ // Result: e ≈ 2.71828...
46
+
47
+ // From unit tests:
48
+ Result = 2.71828182845905 ^ -0.282444
49
+ ```
50
+
51
+ ### In Complex Formulas
52
+
53
+ ```expression
54
+ // Environmental calculation from unit tests
55
+ EGS = ROUND(ROUND(0.0172834*2.71828182845905^(-0.0117685*Temp),5)*SQRT(ROUND(16.294-0.163*HR,1)/60),4)
56
+ ```
57
+
58
+ ## Use Cases
59
+
60
+ - **Exponential growth/decay**: Population growth, radioactive decay
61
+ - **Finance**: Continuous compound interest
62
+ - **Probability**: Normal distribution calculations
63
+ - **Calculus**: Natural logarithm and exponential functions
64
+ - **Physics**: Decay processes, thermodynamics
65
+
66
+ ## Related Functions
67
+
68
+ - [pi](./pi.md) - Pi constant
69
+ - [exp](./exp.md) - e raised to a power
70
+ - [log](./log.md) - Logarithm
71
+
72
+ ## Notes
73
+
74
+ - Returns the full precision value stored in the Math service
75
+ - Uses arbitrary precision arithmetic
76
+ - Also known as Napier's constant
77
+ - Approximately equal to 2.71828182845904523536...
@@ -0,0 +1,74 @@
1
+ # exp
2
+
3
+ Calculates e raised to the power of a number.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ exp(exponent)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `exponent` | Number | The power to raise e to |
16
+
17
+ ## Returns
18
+
19
+ Number - The value of e^exponent.
20
+
21
+ ## Description
22
+
23
+ The `exp` function calculates e (Euler's number, approximately 2.71828) raised to the specified power. This is the inverse of the natural logarithm function.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = EXP(1)
31
+ // Result: 2.718281828459045 (e)
32
+ ```
33
+
34
+ ### Exponential of Zero
35
+
36
+ ```expression
37
+ Result = EXP(0)
38
+ // Result: 1
39
+ ```
40
+
41
+ ### With Variables
42
+
43
+ ```expression
44
+ GrowthFactor = EXP(Rate * Time)
45
+ ```
46
+
47
+ ### Inverse of log
48
+
49
+ ```expression
50
+ // EXP and LOG are inverse functions
51
+ Original = 2.5
52
+ Transformed = EXP(LOG(Original))
53
+ // Transformed ≈ 2.5
54
+ ```
55
+
56
+ ## Use Cases
57
+
58
+ - **Growth models**: Exponential growth calculations
59
+ - **Statistics**: Normal distribution calculations
60
+ - **Finance**: Continuous compound interest
61
+ - **Physics**: Decay and growth functions
62
+
63
+ ## Related Functions
64
+
65
+ - [log](./log.md) - Inverse function (natural logarithm)
66
+ - [euler](./euler.md) - Euler's number constant
67
+ - [sqrt](./sqrt.md) - Square root
68
+
69
+ ## Notes
70
+
71
+ - EXP(0) = 1
72
+ - EXP(1) = e ≈ 2.71828
73
+ - Uses JavaScript's `Math.exp` internally
74
+ - Useful for exponential growth/decay calculations
@@ -0,0 +1,67 @@
1
+ # findfirstvaluebyexactmatch
2
+
3
+ Finds the first object in an array where a property exactly matches a value.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ findfirstvaluebyexactmatch(array, property, value)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | Array of objects to search |
16
+ | `property` | String | Property name to match against |
17
+ | `value` | Any | Value to match |
18
+
19
+ ## Returns
20
+
21
+ Object - The first matching object, or undefined if not found.
22
+
23
+ ## Description
24
+
25
+ The `findfirstvaluebyexactmatch` function searches through an array of objects and returns the first object where the specified property exactly matches the given value.
26
+
27
+ ## Examples
28
+
29
+ ### Basic Usage
30
+
31
+ ```expression
32
+ // Given array: [{ id: 1, name: "Alice" }, { id: 2, name: "Bob" }]
33
+ Result = FINDFIRSTVALUEBYEXACTMATCH(Users, "name", "Bob")
34
+ // Result: { id: 2, name: "Bob" }
35
+ ```
36
+
37
+ ### Find by ID
38
+
39
+ ```expression
40
+ User = FINDFIRSTVALUEBYEXACTMATCH(AppData.Users, "id", "U123")
41
+ ```
42
+
43
+ ### Product Lookup
44
+
45
+ ```expression
46
+ Product = FINDFIRSTVALUEBYEXACTMATCH(Products, "sku", "WIDGET-001")
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Lookups**: Find record by unique property
52
+ - **Data retrieval**: Get specific object
53
+ - **Validation**: Check if record exists
54
+ - **Search**: Simple exact-match search
55
+
56
+ ## Related Functions
57
+
58
+ - [findfirstvaluebystringincludes](./findfirstvaluebystringincludes.md) - Partial string match
59
+ - [match](./match.md) - Regex pattern matching
60
+ - [entryinset](./entryinset.md) - Check if value exists in set
61
+
62
+ ## Notes
63
+
64
+ - Returns first match only
65
+ - Case-sensitive matching
66
+ - Returns undefined if not found
67
+ - Uses the Utility service's `findFirstValueByExactMatch` method
@@ -0,0 +1,67 @@
1
+ # findfirstvaluebystringincludes
2
+
3
+ Finds the first object where a property contains a substring.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ findfirstvaluebystringincludes(array, property, substring)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | Array of objects to search |
16
+ | `property` | String | Property name to search in |
17
+ | `substring` | String | Substring to search for |
18
+
19
+ ## Returns
20
+
21
+ Object - The first matching object, or undefined if not found.
22
+
23
+ ## Description
24
+
25
+ The `findfirstvaluebystringincludes` function searches through an array of objects and returns the first object where the specified property contains the given substring.
26
+
27
+ ## Examples
28
+
29
+ ### Basic Usage
30
+
31
+ ```expression
32
+ // Given: [{ name: "Alice Smith" }, { name: "Bob Jones" }]
33
+ Result = FINDFIRSTVALUEBYSTRINGINCLUDES(Users, "name", "Smith")
34
+ // Result: { name: "Alice Smith" }
35
+ ```
36
+
37
+ ### Email Search
38
+
39
+ ```expression
40
+ User = FINDFIRSTVALUEBYSTRINGINCLUDES(Users, "email", "@company.com")
41
+ ```
42
+
43
+ ### Description Search
44
+
45
+ ```expression
46
+ Product = FINDFIRSTVALUEBYSTRINGINCLUDES(Products, "description", "wireless")
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Fuzzy search**: Find by partial match
52
+ - **Text search**: Search in text fields
53
+ - **Filtering**: Find containing substring
54
+ - **Lookups**: Partial name/ID matching
55
+
56
+ ## Related Functions
57
+
58
+ - [findfirstvaluebyexactmatch](./findfirstvaluebyexactmatch.md) - Exact match
59
+ - [match](./match.md) - Regex pattern matching
60
+ - [entryinset](./entryinset.md) - Check membership
61
+
62
+ ## Notes
63
+
64
+ - Case-sensitive by default
65
+ - Returns first match only
66
+ - Partial string matching
67
+ - Uses the Utility service's `findFirstValueByStringIncludes` method
@@ -0,0 +1,76 @@
1
+ # flatten
2
+
3
+ Flattens a nested array or extracts property values from an array of objects.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ flatten(array)
9
+ flatten(arrayOfObjects.property)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `array` | Array | The array to flatten or property path to extract |
17
+
18
+ ## Returns
19
+
20
+ Array - A flattened array of values.
21
+
22
+ ## Description
23
+
24
+ The `flatten` function can flatten nested arrays into a single-level array, or extract all values of a specific property from an array of objects. This is essential for preparing data for aggregate functions.
25
+
26
+ ## Examples
27
+
28
+ ### Flatten Nested Arrays
29
+
30
+ ```expression
31
+ Result = FLATTEN([[1, 2], [3, 4], [5]])
32
+ // Result: [1, 2, 3, 4, 5]
33
+ ```
34
+
35
+ ### Extract Property Values
36
+
37
+ ```expression
38
+ // Given AppData.Cities with objects containing 'population' property
39
+ Populations = FLATTEN(AppData.Cities.population)
40
+ // Result: [39538223, 29145505, 21538187, ...]
41
+ ```
42
+
43
+ ### With Aggregate Functions
44
+
45
+ ```expression
46
+ // Sum all populations
47
+ TotalPopulation = SUM(FLATTEN(AppData.Cities.population))
48
+ ```
49
+
50
+ ### Chain Operations
51
+
52
+ ```expression
53
+ // Get average of extracted values
54
+ AverageScore = AVG(FLATTEN(AppData.Students.score))
55
+ ```
56
+
57
+ ## Use Cases
58
+
59
+ - **Data extraction**: Get property values from object arrays
60
+ - **Array processing**: Flatten nested structures
61
+ - **Aggregation prep**: Prepare data for SUM, AVG, etc.
62
+ - **Data transformation**: Restructure array data
63
+
64
+ ## Related Functions
65
+
66
+ - [sum](./sum.md) - Sum flattened values
67
+ - [avg](./avg.md) - Average flattened values
68
+ - [objectkeystoarray](./objectkeystoarray.md) - Extract object keys
69
+ - [objectvaluestoarray](./objectvaluestoarray.md) - Extract object values
70
+
71
+ ## Notes
72
+
73
+ - Critical for preparing data for aggregate functions
74
+ - Works with both nested arrays and object arrays
75
+ - Uses the Math service's `flatten` method
76
+ - Commonly used in data pipelines