google / google/jsonnet

A (un)splat operator for named arguments

Open
#203 12 comments 13 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.