Home

cuesonnet @main - refs - log -
-
https://git.jolheiser.com/cuesonnet.git
CUE + Jsonnet
cuesonnet / testdata / jsonnet / stdlib / data.jsonnet
- raw -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
local words = ['hello', 'world', 'jsonnet'];

{
  upper: std.asciiUpper(words[0]),
  joined: std.join(', ', words),
  formatted: std.format('count=%d, first=%s', [std.length(words), words[0]]),
  count: std.length(words),
  words: words,
  mapped: std.map(function(w) std.asciiUpper(w), words),
  filtered: std.filter(function(w) std.length(w) > 5, words),
}