fable 3.1.51 → 3.1.52

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 +7 -5
  3. package/dist/fable.js.map +1 -1
  4. package/dist/fable.min.js +1 -1
  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 +1 -1
  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,69 @@
1
+ # matrixvectormultiply
2
+
3
+ Multiplies a matrix by a vector.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ matrixvectormultiply(matrix, vector)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `matrix` | Array | 2D array representing the matrix (m×n) |
16
+ | `vector` | Array | 1D array representing the vector (length n) |
17
+
18
+ ## Returns
19
+
20
+ Array - The resulting vector (length m).
21
+
22
+ ## Description
23
+
24
+ The `matrixvectormultiply` function multiplies a matrix by a column vector. The vector length must equal the number of columns in the matrix.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ // Matrix: [[1, 2], [3, 4]]
32
+ // Vector: [5, 6]
33
+ Result = MATRIXVECTORMULTIPLY([[1, 2], [3, 4]], [5, 6])
34
+ // Result: [17, 39]
35
+ // [1*5 + 2*6, 3*5 + 4*6] = [17, 39]
36
+ ```
37
+
38
+ ### Transformation
39
+
40
+ ```expression
41
+ // Apply transformation to point
42
+ NewPoint = MATRIXVECTORMULTIPLY(RotationMatrix, Point)
43
+ ```
44
+
45
+ ### Linear Combination
46
+
47
+ ```expression
48
+ // Compute linear combination of basis vectors
49
+ Result = MATRIXVECTORMULTIPLY(BasisMatrix, Coefficients)
50
+ ```
51
+
52
+ ## Use Cases
53
+
54
+ - **Linear transformations**: Apply transforms to points
55
+ - **Solving equations**: Part of solving Ax = b
56
+ - **Graphics**: Coordinate transformations
57
+ - **Physics**: Linear operations
58
+
59
+ ## Related Functions
60
+
61
+ - [matrixmultiply](./matrixmultiply.md) - Matrix-matrix multiplication
62
+ - [matrixtranspose](./matrixtranspose.md) - Transpose matrix
63
+ - [matrixinverse](./matrixinverse.md) - Matrix inverse
64
+
65
+ ## Notes
66
+
67
+ - Vector treated as column vector
68
+ - Vector length must match matrix columns
69
+ - Uses the Math service's `matrixVectorMultiply` method
@@ -0,0 +1,73 @@
1
+ # max
2
+
3
+ Returns the largest value from a set of numbers.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ max(value1, value2, ...)
9
+ max(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Number(s) | Individual numbers or an array of numbers |
17
+
18
+ ## Returns
19
+
20
+ String - The maximum value from the input set.
21
+
22
+ ## Description
23
+
24
+ The `max` function finds and returns the largest value from a set of numbers. It can accept individual arguments or an array of values.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = MAX(5, 10, 3, 8)
32
+ // Result: "10"
33
+ ```
34
+
35
+ ### With Variables
36
+
37
+ ```expression
38
+ Highest = MAX(Score1, Score2, Score3)
39
+ ```
40
+
41
+ ### With Array
42
+
43
+ ```expression
44
+ // Given an array of values
45
+ MaxValue = MAX(AppData.Scores)
46
+ ```
47
+
48
+ ### In Expressions
49
+
50
+ ```expression
51
+ // Find the highest price
52
+ MaxPrice = MAX(FLATTEN(AppData.Products.price))
53
+ ```
54
+
55
+ ## Use Cases
56
+
57
+ - **Data analysis**: Find highest values in datasets
58
+ - **Pricing**: Determine maximum price
59
+ - **Scoring**: Find top scores
60
+ - **Limits**: Establish upper bounds
61
+
62
+ ## Related Functions
63
+
64
+ - [min](./min.md) - Find minimum value
65
+ - [largestinset](./largestinset.md) - Alternative for finding largest
66
+ - [sortset](./sortset.md) - Sort values to find extremes
67
+ - [avg](./avg.md) - Calculate average
68
+
69
+ ## Notes
70
+
71
+ - Returns result as string (arbitrary precision)
72
+ - Works with the Math service's `maxPrecise` method
73
+ - Handles both individual arguments and arrays
@@ -0,0 +1,63 @@
1
+ # mean
2
+
3
+ Calculates the arithmetic mean (average) of values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ mean(value1, value2, ...)
9
+ mean(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Number(s) | Individual numbers or an array of numbers |
17
+
18
+ ## Returns
19
+
20
+ String - The arithmetic mean.
21
+
22
+ ## Description
23
+
24
+ The `mean` function calculates the arithmetic mean (average) of a set of numbers. This is an alias for the `avg` function.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = MEAN(10, 20, 30, 40, 50)
32
+ // Result: "30"
33
+ ```
34
+
35
+ ### With Array
36
+
37
+ ```expression
38
+ Average = MEAN(FLATTEN(AppData.Scores))
39
+ ```
40
+
41
+ ### Statistics
42
+
43
+ ```expression
44
+ MeanValue = MEAN(DataSet)
45
+ ```
46
+
47
+ ## Use Cases
48
+
49
+ - **Statistics**: Central tendency
50
+ - **Analysis**: Average values
51
+ - **Reporting**: Mean calculations
52
+
53
+ ## Related Functions
54
+
55
+ - [avg](./avg.md) - Same function (alias)
56
+ - [median](./median.md) - Middle value
57
+ - [mode](./mode.md) - Most frequent value
58
+
59
+ ## Notes
60
+
61
+ - Alias for `avg` function
62
+ - Uses the Math service's `meanPrecise` method
63
+ - Returns result as string for precision
@@ -0,0 +1,79 @@
1
+ # median
2
+
3
+ Returns the middle value of a sorted set.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ median(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | An array of numeric values |
16
+
17
+ ## Returns
18
+
19
+ String - The median value.
20
+
21
+ ## Description
22
+
23
+ The `median` function returns the middle value when all values are sorted. For an odd number of values, it returns the exact middle value. For an even number of values, it returns the average of the two middle values.
24
+
25
+ ## Examples
26
+
27
+ ### Odd Number of Values
28
+
29
+ ```expression
30
+ TotalCost = MEDIAN(ItemCosts)
31
+ // With ItemCosts = [100, 200, 50, 45, 5]
32
+ // Sorted: [5, 45, 50, 100, 200]
33
+ // Result: "50" (the middle value)
34
+ ```
35
+
36
+ ### Even Number of Values
37
+
38
+ ```expression
39
+ Result = median([1, 2, 3, 4])
40
+ // Sorted: [1, 2, 3, 4]
41
+ // Middle values: 2 and 3
42
+ // Result: "2.5" (average of 2 and 3)
43
+ ```
44
+
45
+ ### With Variable Data
46
+
47
+ ```expression
48
+ MedianPrice = MEDIAN(Prices)
49
+ // Finds the middle price point
50
+ ```
51
+
52
+ ## Use Cases
53
+
54
+ - **Statistics**: Robust measure of central tendency
55
+ - **Real estate**: Median home prices (less affected by outliers)
56
+ - **Income analysis**: Median income (avoids skew from extremes)
57
+ - **Quality metrics**: Median response time
58
+
59
+ ## Advantages Over Mean
60
+
61
+ The median is more robust than the mean for skewed data:
62
+
63
+ ```expression
64
+ // Example: [1, 2, 3, 4, 1000]
65
+ Mean = 202 // Heavily influenced by 1000
66
+ Median = 3 // Better represents typical value
67
+ ```
68
+
69
+ ## Related Functions
70
+
71
+ - [avg](./avg.md) / [mean](./mean.md) - Arithmetic average
72
+ - [mode](./mode.md) - Most frequent value
73
+ - [min](./min.md) / [max](./max.md) - Extremes
74
+
75
+ ## Notes
76
+
77
+ - Values are automatically sorted before finding median
78
+ - Uses arbitrary precision arithmetic
79
+ - Works with the Math service's `medianPrecise` method
@@ -0,0 +1,73 @@
1
+ # min
2
+
3
+ Returns the smallest value from a set of numbers.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ min(value1, value2, ...)
9
+ min(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Number(s) | Individual numbers or an array of numbers |
17
+
18
+ ## Returns
19
+
20
+ String - The minimum value from the input set.
21
+
22
+ ## Description
23
+
24
+ The `min` function finds and returns the smallest value from a set of numbers. It can accept individual arguments or an array of values.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = MIN(5, 10, 3, 8)
32
+ // Result: "3"
33
+ ```
34
+
35
+ ### With Variables
36
+
37
+ ```expression
38
+ Lowest = MIN(Price1, Price2, Price3)
39
+ ```
40
+
41
+ ### With Array
42
+
43
+ ```expression
44
+ // Given an array of values
45
+ MinValue = MIN(AppData.Temperatures)
46
+ ```
47
+
48
+ ### Finding Range
49
+
50
+ ```expression
51
+ // Calculate the range of values
52
+ Range = MAX(Values) - MIN(Values)
53
+ ```
54
+
55
+ ## Use Cases
56
+
57
+ - **Data analysis**: Find lowest values in datasets
58
+ - **Pricing**: Determine minimum price
59
+ - **Quality control**: Find minimum measurements
60
+ - **Limits**: Establish lower bounds
61
+
62
+ ## Related Functions
63
+
64
+ - [max](./max.md) - Find maximum value
65
+ - [smallestinset](./smallestinset.md) - Alternative for finding smallest
66
+ - [sortset](./sortset.md) - Sort values to find extremes
67
+ - [avg](./avg.md) - Calculate average
68
+
69
+ ## Notes
70
+
71
+ - Returns result as string (arbitrary precision)
72
+ - Works with the Math service's `minPrecise` method
73
+ - Handles both individual arguments and arrays
@@ -0,0 +1,66 @@
1
+ # mode
2
+
3
+ Returns the most frequently occurring value in a dataset.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ mode(value1, value2, ...)
9
+ mode(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Number(s) | Individual numbers or an array of numbers |
17
+
18
+ ## Returns
19
+
20
+ String - The value that appears most frequently.
21
+
22
+ ## Description
23
+
24
+ The `mode` function finds and returns the most frequently occurring value in a dataset. If multiple values have the same highest frequency, it returns one of them.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = MODE(1, 2, 2, 3, 3, 3, 4)
32
+ // Result: "3" (appears 3 times)
33
+ ```
34
+
35
+ ### With Array
36
+
37
+ ```expression
38
+ // Find most common value
39
+ MostCommon = MODE(AppData.Ratings)
40
+ ```
41
+
42
+ ### Survey Data
43
+
44
+ ```expression
45
+ // Find most selected option
46
+ PopularChoice = MODE(FLATTEN(AppData.Survey.response))
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Survey analysis**: Find most common response
52
+ - **Quality control**: Identify most frequent measurement
53
+ - **Market research**: Most popular choice
54
+ - **Statistics**: Central tendency analysis
55
+
56
+ ## Related Functions
57
+
58
+ - [median](./median.md) - Middle value
59
+ - [avg](./avg.md) - Arithmetic mean
60
+ - [distributionhistogram](./distributionhistogram.md) - Full frequency distribution
61
+
62
+ ## Notes
63
+
64
+ - Returns result as string
65
+ - Works with the Math service's `modePrecise` method
66
+ - For multimodal datasets, returns one of the modes
@@ -0,0 +1,66 @@
1
+ # objectkeystoarray
2
+
3
+ Extracts all keys from an object as an array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ objectkeystoarray(object)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `object` | Object | The object to extract keys from |
16
+
17
+ ## Returns
18
+
19
+ Array - Array of all keys from the object.
20
+
21
+ ## Description
22
+
23
+ The `objectkeystoarray` function returns all property names (keys) from an object as an array. This is useful for iterating over object properties or analyzing object structure.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ // Given object: { name: "John", age: 30, city: "NYC" }
31
+ Result = OBJECTKEYSTOARRAY(Person)
32
+ // Result: ["name", "age", "city"]
33
+ ```
34
+
35
+ ### With Histogram
36
+
37
+ ```expression
38
+ // Get all category names from histogram
39
+ Categories = OBJECTKEYSTOARRAY(CategoryCounts)
40
+ ```
41
+
42
+ ### Dynamic Property Access
43
+
44
+ ```expression
45
+ Keys = OBJECTKEYSTOARRAY(ConfigObject)
46
+ // Use keys for iteration or display
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Object inspection**: List all properties
52
+ - **Dynamic iteration**: Process unknown objects
53
+ - **Validation**: Check expected properties exist
54
+ - **Display**: Show object structure
55
+
56
+ ## Related Functions
57
+
58
+ - [objectvaluestoarray](./objectvaluestoarray.md) - Extract values instead
59
+ - [getvalue](./getvalue.md) - Get specific value by key
60
+ - [flatten](./flatten.md) - Flatten arrays
61
+
62
+ ## Notes
63
+
64
+ - Returns array of strings (key names)
65
+ - Order may not be guaranteed
66
+ - Uses the Math service's `objectKeysToArray` method
@@ -0,0 +1,65 @@
1
+ # objectvaluessortbyexternalobjectarray
2
+
3
+ Sorts object values based on an external ordering array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ objectvaluessortbyexternalobjectarray(object, orderArray, keyProperty)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `object` | Object | Object to sort values from |
16
+ | `orderArray` | Array | Array defining the sort order |
17
+ | `keyProperty` | String | Property to match for ordering |
18
+
19
+ ## Returns
20
+
21
+ Array - Values sorted according to external order.
22
+
23
+ ## Description
24
+
25
+ The `objectvaluessortbyexternalobjectarray` function extracts values from an object and sorts them based on the order defined by an external array.
26
+
27
+ ## Examples
28
+
29
+ ### Basic Usage
30
+
31
+ ```expression
32
+ Data = { 'a': 10, 'b': 20, 'c': 30 }
33
+ Order = [{ key: 'c' }, { key: 'a' }, { key: 'b' }]
34
+
35
+ Result = OBJECTVALUESSORTBYEXTERNALOBJECTARRAY(Data, Order, "key")
36
+ // Result: [30, 10, 20] (sorted: c, a, b)
37
+ ```
38
+
39
+ ### Custom Display Order
40
+
41
+ ```expression
42
+ // Sort categories by custom priority
43
+ CategoryData = { 'urgent': 5, 'normal': 10, 'low': 2 }
44
+ Priority = [{ name: 'urgent' }, { name: 'normal' }, { name: 'low' }]
45
+
46
+ Sorted = OBJECTVALUESSORTBYEXTERNALOBJECTARRAY(CategoryData, Priority, "name")
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Custom ordering**: Sort by external criteria
52
+ - **Display order**: Match specific sort order
53
+ - **Prioritization**: Order by priority list
54
+ - **Report generation**: Consistent ordering
55
+
56
+ ## Related Functions
57
+
58
+ - [sorthistogram](./sorthistogram.md) - Sort by values
59
+ - [sorthistogrambykeys](./sorthistogrambykeys.md) - Sort alphabetically
60
+ - [objectvaluestoarray](./objectvaluestoarray.md) - Extract values
61
+
62
+ ## Notes
63
+
64
+ - Maintains relationship between keys and values
65
+ - Uses the Math service
@@ -0,0 +1,67 @@
1
+ # objectvaluestoarray
2
+
3
+ Extracts all values from an object as an array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ objectvaluestoarray(object)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `object` | Object | The object to extract values from |
16
+
17
+ ## Returns
18
+
19
+ Array - Array of all values from the object.
20
+
21
+ ## Description
22
+
23
+ The `objectvaluestoarray` function returns all property values from an object as an array. This is useful for aggregating values without needing the keys.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ // Given object: { name: "John", age: 30, city: "NYC" }
31
+ Result = OBJECTVALUESTOARRAY(Person)
32
+ // Result: ["John", 30, "NYC"]
33
+ ```
34
+
35
+ ### Sum Histogram Values
36
+
37
+ ```expression
38
+ // Get all counts from histogram and sum them
39
+ Values = OBJECTVALUESTOARRAY(CategoryCounts)
40
+ Total = SUM(Values)
41
+ ```
42
+
43
+ ### Aggregate Processing
44
+
45
+ ```expression
46
+ AllValues = OBJECTVALUESTOARRAY(DataObject)
47
+ Average = AVG(AllValues)
48
+ ```
49
+
50
+ ## Use Cases
51
+
52
+ - **Aggregation**: Sum or average all values
53
+ - **Collection**: Get all values regardless of key
54
+ - **Analysis**: Process all object values
55
+ - **Display**: List all values
56
+
57
+ ## Related Functions
58
+
59
+ - [objectkeystoarray](./objectkeystoarray.md) - Extract keys instead
60
+ - [flatten](./flatten.md) - Flatten nested arrays
61
+ - [sum](./sum.md) - Sum the extracted values
62
+
63
+ ## Notes
64
+
65
+ - Returns array of values (any type)
66
+ - Order corresponds to key order
67
+ - Uses the Math service's `objectValuesToArray` method
@@ -0,0 +1,75 @@
1
+ # percent
2
+
3
+ Calculates what percentage one value is of another.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ percent(part, whole)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `part` | Number | The partial value |
16
+ | `whole` | Number | The total value |
17
+
18
+ ## Returns
19
+
20
+ String - The percentage as a decimal (multiply by 100 for traditional percentage).
21
+
22
+ ## Description
23
+
24
+ The `percent` function calculates what percentage the first value is of the second value. The result is returned as a decimal ratio.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = PERCENT(25, 100)
32
+ // Result: "0.25" (25%)
33
+ ```
34
+
35
+ ### Sales Percentage
36
+
37
+ ```expression
38
+ // What percentage of goal was achieved?
39
+ Achievement = PERCENT(ActualSales, SalesGoal)
40
+ ```
41
+
42
+ ### With Multiplication for Display
43
+
44
+ ```expression
45
+ // Get traditional percentage value
46
+ PercentValue = PERCENT(50, 200) * 100
47
+ // Result: 25 (25%)
48
+ ```
49
+
50
+ ### Completion Rate
51
+
52
+ ```expression
53
+ // Calculate completion percentage
54
+ CompletionRate = PERCENT(CompletedTasks, TotalTasks)
55
+ ```
56
+
57
+ ## Use Cases
58
+
59
+ - **Business metrics**: Calculate achievement percentages
60
+ - **Data analysis**: Proportion calculations
61
+ - **Progress tracking**: Completion percentages
62
+ - **Financial reporting**: Ratio analysis
63
+
64
+ ## Related Functions
65
+
66
+ - [compare](./compare.md) - Compare two values
67
+ - [round](./round.md) - Round percentage results
68
+ - [tofixed](./tofixed.md) - Format percentage with decimals
69
+
70
+ ## Notes
71
+
72
+ - Returns decimal, not percentage (0.25 not 25%)
73
+ - Multiply by 100 for traditional percentage display
74
+ - Uses the Math service's `percentPrecise` method
75
+ - Returns result as string for precision