Skip to content

Commit 41ea878

Browse files
committed
Few fixes
1 parent 38cba3b commit 41ea878

File tree

3 files changed

+109
-113
lines changed

3 files changed

+109
-113
lines changed

arcade-sdk-tests/data_functions.md

+41-39
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The input array to test.
8383
- **`testFunction`**: [Function](../../guide/logic/#user-defined-functions)
8484
The function used to test each element in the array. The function must return a truthy value if the element passes the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:
8585

86-
- **`value`**: *
86+
- **`value`**: Any
8787
Represents the value of an element in the array.
8888

8989
#### Return value: [Boolean](../../guide/types/#boolean)
@@ -130,7 +130,7 @@ The input array to test.
130130
- **`testFunction`**: [Function](../../guide/logic/#user-defined-functions)
131131
The function used to test each element in the `inputArray`. The The function must return a truthy value if the element passes the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:
132132

133-
- **`value`**: *
133+
- **`value`**: Any
134134
Represents the value of an element in the array.
135135

136136
#### Return value: [Boolean](../../guide/types/#boolean)
@@ -174,7 +174,7 @@ Returns a new array of a given length.
174174

175175
- **`value`**: [Number](../../guide/types/#number)
176176
The desired length for the new array.
177-
- **`defaultValue`** (_Optional_): *
177+
- **`defaultValue`** (_Optional_): Any
178178
The value for each element in the array. If no value is specified, the default will be `null`.
179179

180180
#### Return value: [Array](../../guide/types/#array)
@@ -238,7 +238,7 @@ Count(Attachments($feature))
238238

239239
## Back
240240

241-
### Back( array ) -> *
241+
### Back( array ) -> Any
242242

243243
**[Since version 1.12](../../guide/version-matrix)**
244244

@@ -249,7 +249,7 @@ Returns the last element of an array. If the array is empty, then `Back(array)`
249249
- **`array`**: [Array](../../guide/types/#array)
250250
The array to get the last value from.
251251

252-
#### Return value: *
252+
#### Return value: Any
253253

254254
#### Example
255255

@@ -304,9 +304,9 @@ Logs a message in the messages window for debugging purposes. This function can
304304

305305
#### Parameters
306306

307-
- **`message`**: *
307+
- **`message`**: Any
308308
A messages to output in the messages window.
309-
- **`[value1, ..., valueN]`** (_Optional_): *
309+
- **`[value1, ..., valueN]`** (_Optional_): Any
310310
A list of variables, text, nunber, or dictionary to output in the messages window.
311311

312312
#### Return value: Null
@@ -411,9 +411,9 @@ Returns a new dictionary based on the provided arguments. The arguments are name
411411

412412
- **`name1`**: [Text](../../guide/types/#text)
413413
The attribute name.
414-
- **`value1`**: *
414+
- **`value1`**: Any
415415
The attribute value to pair to `name1`.
416-
- **`[name2, value2, ..., nameN, valueN]`** (_Optional_): *
416+
- **`[name2, value2, ..., nameN, valueN]`** (_Optional_): Any
417417
Ongoing name/value pairs.
418418

419419
#### Return value: [Dictionary](../../guide/types/#dictionary)
@@ -959,7 +959,7 @@ The geometry of the feature.
959959
The first attribute's name.
960960
- **`value1`**: [Text](../../guide/types/#text) \| [Date](../../guide/types/#date) \| [Number](../../guide/types/#number) \| [Boolean](../../guide/types/#boolean)
961961
The first attribute's value.
962-
- **`[attribute2, value2, ..., attributeN, valueN]`** (_Optional_): *
962+
- **`[attribute2, value2, ..., attributeN, valueN]`** (_Optional_): Any
963963
Ongoing name/value pairs for each attribute in the feature.
964964

965965
#### Return value: [Feature](../../guide/types/#feature)
@@ -1081,7 +1081,7 @@ Applies to `midspan` association types. Returns a floating point number from 0-1
10811081
- **`side`**: [Text](../../guide/types/#text)
10821082
Applies to `junctionEdge` association types. Indicates which side the junction is on.
10831083

1084-
**Possible values:** `from` \| `to`
1084+
Possible values: `from` or `to`
10851085

10861086
#### Examples
10871087

@@ -1118,7 +1118,8 @@ Creates a FeatureSet from a Feature Layer based on its layer ID within a map or
11181118
- **`featureSetCollection`**: [FeatureSetCollection](../../guide/types/#featuresetcollection)
11191119
The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the `$map` or `$datastore` global.
11201120
- **`id`**: [Text](../../guide/types/#text)
1121-
The ID of the layer within the given `map`. This layer must be created from a feature service; feature collections are not supported. **Please note that this must be a string literal.**
1121+
The ID of the layer within the given `map`. This layer must be created from a feature service; feature collections are not supported.
1122+
**Please note that this must be a string literal.**
11221123
- **`fields`** (_Optional_): [Text[]](../../guide/types/#text)
11231124
The fields to include in the FeatureSet. By default, all fields are included. To request all fields in the layer, set this value to `['*']`. Limiting the number of fields improves the performance of the script.
11241125
- **`includeGeometry`** (_Optional_): [Boolean](../../guide/types/#boolean)
@@ -1153,7 +1154,8 @@ Creates a FeatureSet from a Feature Layer based on its name within a map or feat
11531154
- **`featureSetCollection`**: [FeatureSetCollection](../../guide/types/#featuresetcollection)
11541155
The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the `$map` or `$datastore` global.
11551156
- **`title`**: [Text](../../guide/types/#text)
1156-
The title of the layer within the given `map`. This layer must be created from a feature service; feature collections are not supported. **Please note that this must be a string literal.**
1157+
The title of the layer within the given `map`. This layer must be created from a feature service; feature collections are not supported.
1158+
**Please note that this must be a string literal.**
11571159
- **`fields`** (_Optional_): [Text[]](../../guide/types/#text)
11581160
The fields to include in the FeatureSet. By default, all fields are included. To request all fields in the layer, set this value to `['*']`. Limiting the number of fields improves the performance of the script.
11591161
- **`includeGeometry`** (_Optional_): [Boolean](../../guide/types/#boolean)
@@ -1308,7 +1310,7 @@ The input array to filter.
13081310
- **`filterFunction`**: [Function](../../guide/logic/#user-defined-functions)
13091311
The function used to filter elements in the array. The The function must return a truthy value if the element passes the test. This function can be a user-defined function or a core Arcade function defined with the following parameter:
13101312

1311-
- **`value`**: *
1313+
- **`value`**: Any
13121314
Represents the value of an element in the array.
13131315

13141316
#### Return value: [Array](../../guide/types/#array)
@@ -1346,11 +1348,11 @@ Filter(myArray, isNotEmpty)
13461348

13471349
This function has 2 signatures:
13481350

1349-
- [First( array ) -> *](#first1)
1351+
- [First( array ) -> Any](#first1)
13501352
- [First( features ) -> Feature](#first2)
13511353

13521354
<a name="first1"></a>
1353-
### First( array ) -> *
1355+
### First( array ) -> Any
13541356

13551357
Returns the first element in an array. Returns `null` if the array is empty.
13561358

@@ -1359,7 +1361,7 @@ Returns the first element in an array. Returns `null` if the array is empty.
13591361
- **`array`**: [Array](../../guide/types/#array)
13601362
The array from which to return the first item.
13611363

1362-
#### Return value: *
1364+
#### Return value: Any
13631365

13641366
#### Example
13651367

@@ -1933,7 +1935,7 @@ Determines whether an array contains a given value. Returns `true` if the value
19331935

19341936
- **`array`**: [Array](../../guide/types/#array)
19351937
The input array.
1936-
- **`value`**: *
1938+
- **`value`**: Any
19371939
The value to look for in the given array.
19381940

19391941
#### Return value: [Boolean](../../guide/types/#boolean)
@@ -1965,7 +1967,7 @@ Returns the zero-based index location of the input item in an array. If `item` d
19651967

19661968
- **`array`**: [Array](../../guide/types/#array)
19671969
The array to search.
1968-
- **`value`**: *
1970+
- **`value`**: Any
19691971
The item to locate in the array.
19701972

19711973
#### Return value: [Number](../../guide/types/#number)
@@ -1996,7 +1998,7 @@ Inserts a new value into an array at a given index. Existing elements positioned
19961998
The array to insert the new value into.
19971999
- **`index`**: [Number](../../guide/types/#number)
19982000
The index of the array where the new value should be inserted. An index of 0 will insert the value at the beginning of the array. An index that equals the size of the array will insert the value at the end of the array. An index greater than the size of the array will cause an error. If a negative index is provided, it will be used as an offset from the end of the array.
1999-
- **`value`**: *
2001+
- **`value`**: Any
20002002
The value to insert into the array.
20012003

20022004
#### Return value: Null
@@ -2026,7 +2028,7 @@ Returns `true` if the provided value is `null` or an empty string (e.g. `''`). R
20262028

20272029
#### Parameter
20282030

2029-
- **`value`**: *
2031+
- **`value`**: Any
20302032
The value that is compared against `null` or `''`. This may be a value of any type.
20312033

20322034
#### Return value: [Boolean](../../guide/types/#boolean)
@@ -2056,7 +2058,7 @@ Indicates whether the input value is not a number (NaN). A number is considered
20562058

20572059
#### Parameter
20582060

2059-
- **`value`**: *
2061+
- **`value`**: Any
20602062
The value to check if it is NaN.
20612063

20622064
#### Return value: [Boolean](../../guide/types/#boolean)
@@ -2091,7 +2093,7 @@ The input array to map.
20912093
- **`mappingFunction`**: [Function](../../guide/logic/#user-defined-functions)
20922094
The function to call on each element in the provided array. The function must return a new item that will be part of the returned array. The function can be a user-defined function or a core Arcade function defined with the following parameter:
20932095

2094-
- **`value`**: *
2096+
- **`value`**: Any
20952097
Represents the value of an element in the array.
20962098

20972099
#### Return value: [Array](../../guide/types/#array)
@@ -2169,7 +2171,7 @@ The input array to test.
21692171
- **`testFunction`**: [Function](../../guide/logic/#user-defined-functions)
21702172
The function to test each element in the array. The function must return a falsy value if the element doesn't pass the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:
21712173

2172-
- **`value`**: *
2174+
- **`value`**: Any
21732175
Represents the value of an element in the array.
21742176

21752177
#### Return value: [Boolean](../../guide/types/#boolean)
@@ -2209,7 +2211,7 @@ Parses the input value to a number.
22092211

22102212
#### Parameters
22112213

2212-
- **`value`**: *
2214+
- **`value`**: Any
22132215
The value to convert to a number.
22142216
- **`pattern`** (_Optional_): [Text](../../guide/types/#text)
22152217
The format pattern string used to parse numbers formatted in a localized context from a string value to a number. Sepcial characters to define the pattern:
@@ -2306,7 +2308,7 @@ OrderBy($layer, 'Rank ASC')
23062308

23072309
## Pop
23082310

2309-
### Pop( array ) -> *
2311+
### Pop( array ) -> Any
23102312

23112313
**[Since version 1.12](../../guide/version-matrix)**
23122314

@@ -2317,7 +2319,7 @@ Removes and returns the element at the end of the array. If the array is empty,
23172319
- **`array`**: [Array](../../guide/types/#array)
23182320
The input array from which the last element will be removed and returned.
23192321

2320-
#### Return value: *
2322+
#### Return value: Any
23212323

23222324
#### Example
23232325

@@ -2377,7 +2379,7 @@ Adds an element to the end of an array and returns the new length of the array.
23772379

23782380
- **`array`**: [Array](../../guide/types/#array)
23792381
The array to have elements pushed to.
2380-
- **`value`**: *
2382+
- **`value`**: Any
23812383
The value to add as the last element of the input array.
23822384

23832385
#### Return value: [Number](../../guide/types/#number)
@@ -2395,7 +2397,7 @@ Push(['orange', 'purple', 'gray'], 'red').
23952397

23962398
## Reduce
23972399

2398-
### Reduce( array, reducerFunction, initialValue? ) -> *
2400+
### Reduce( array, reducerFunction, initialValue? ) -> Any
23992401

24002402
**[Since version 1.16](../../guide/version-matrix)**
24012403

@@ -2408,14 +2410,14 @@ The input array to reduce.
24082410
- **`reducerFunction`**: [Function](../../guide/logic/#user-defined-functions)
24092411
The reducer function.
24102412

2411-
- **`previousValue`**: *
2413+
- **`previousValue`**: Any
24122414
The first time the function executes, this will be the first element in the input array or the `initialValue`, if provided.
2413-
- **`arrayValue`**: *
2415+
- **`arrayValue`**: Any
24142416
Represents the current value of an element in the input array.
2415-
- **`initialValue`** (_Optional_): *
2417+
- **`initialValue`** (_Optional_): Any
24162418
An item to pass into the first argument of the reducer function.
24172419

2418-
#### Return value: *
2420+
#### Return value: Any
24192421

24202422
The value that was assembled by the reducer function for each element in the array.
24212423

@@ -2478,7 +2480,7 @@ Changes the number of elements in an array to the specified size. It can be used
24782480
The array to be resized.
24792481
- **`newSize`**: [Number](../../guide/types/#number)
24802482
The number of elements desired in the resized array.
2481-
- **`value`** (_Optional_): *
2483+
- **`value`** (_Optional_): Any
24822484
The optional value that will be used for any new elements added to the array. If no value is specified, the newly added elements will have a `null` value.
24832485

24842486
#### Return value: Null
@@ -2663,9 +2665,9 @@ A user defined function to be used for the sort. The function receives two eleme
26632665
`= 0`: keep the original order of `a` and `b`
26642666
`< 0`: sort `a` before `b`
26652667

2666-
- **`a`**: *
2668+
- **`a`**: Any
26672669
The first element for comparison.
2668-
- **`b`**: *
2670+
- **`b`**: Any
26692671
The second element for comparison.
26702672

26712673
#### Return value: [Array](../../guide/types/#array)
@@ -2706,9 +2708,9 @@ Concatenates all parameters together into a new array.
27062708

27072709
#### Parameters
27082710

2709-
- **`value1`**: *
2711+
- **`value1`**: Any
27102712
A value to be spliced into a new array.
2711-
- **`[value2, ..., valueN]`** (_Optional_): *
2713+
- **`[value2, ..., valueN]`** (_Optional_): Any
27122714
Ongoing values to be spliced into a new array.
27132715

27142716
#### Return value: [Array](../../guide/types/#array)
@@ -2977,7 +2979,7 @@ Returns the type of the input value. Will return one of the following types: Arr
29772979

29782980
#### Parameter
29792981

2980-
- **`value`**: *
2982+
- **`value`**: Any
29812983
The input value, variable, or feature attribute.
29822984

29832985
#### Return value: [Text](../../guide/types/#text)

0 commit comments

Comments
 (0)