Add ?? with nullsafe or default value.
Open
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Description
refs: https://github.com/google/jsonnet/issues/930
better to have it as
```
maybeNullObj?['someField'] ?? 'defaultValue'
```
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
refs in sjsonnet: https://github.com/databricks/sjsonnet/issues/328
refs: https://github.com/CertainLach/jrsonnet/blob/master/docs/features.adoc#exp-null-coalescing
refs: https://tace.alibaba-inc.com/#/tmcp/ali-office/server/supermall/detail?businessId=huming-guarden&selectedKeys=server
Contributor guide
Assessment
This issue has not been assessed yet.