Adding splat[] short hand to collect,eval,map,omit,path,pick

This commit is contained in:
Mike Farah
2024-06-16 10:22:42 +10:00
parent 45eda8dbae
commit f1964dece0
8 changed files with 77 additions and 8 deletions
+10
View File
@@ -14,6 +14,16 @@ var pickOperatorScenarios = []expressionScenario{
"D0, P[], (!!map)::myMap: {hamster: squeak, cat: meow}\n",
},
},
{
description: "Pick splat",
skipDoc: true,
document: "{cat: meow, dog: bark, thing: hamster, hamster: squeak}\n",
expression: `pick(["hamster", "cat"])[]`,
expected: []string{
"D0, P[hamster], (!!str)::squeak\n",
"D0, P[cat], (!!str)::meow\n",
},
},
{
description: "Pick keys from map",
skipDoc: true,