Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart@emeel.net>
19 lines
674 B
JSON
19 lines
674 B
JSON
{
|
|
"expression": ["slice", ["array", ["get", "val"]], ["get", "index"]],
|
|
"inputs": [
|
|
[{}, {"properties": {"val": [1, 2, 3, 4, 5], "index": 2}}],
|
|
[{}, {"properties": {"val": [1, 2, 3, 4, 5], "index": 0}}],
|
|
[{}, {"properties": {"val": [1, 2, 3, 4, 5], "index": 99}}],
|
|
[{}, {"properties": {"val": [1, 2, 3, 4, 5], "index": -2}}]
|
|
],
|
|
"expected": {
|
|
"serialized": ["slice", ["array", ["get", "val"]], ["get", "index"]],
|
|
"compiled": {
|
|
"result": "success",
|
|
"isFeatureConstant": false,
|
|
"isZoomConstant": true,
|
|
"type": "array"
|
|
},
|
|
"outputs": [[3, 4, 5], [1, 2, 3, 4, 5], [], [4, 5]]
|
|
}
|
|
} |