A (un)splat operator for named arguments
Open
enhancement
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Description
What I'd like is for it to behave just like a regular function application, so:
```
local foo(x, y=100, z) = { x: x, y: y, z: z }
local bar = {
x: 1,
y: 2
}
foo(**bar) # Should return { x: 1, y: 100, z: 2 }
```
Going the other way would also be nice:
```
local foo(**kwargs) = kwargs
foo(x=6, y=1) # Should return { x: 6, y: 1 }
```
Contributor guide
Assessment
This issue has not been assessed yet.