• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/ucode/tests/custom/03_stdlib/23_values

  1 The `values()` extracts all values of a given dictionary. The values in the
  2 resulting array are ordered according to the keys which in turn follow
  3 declaration or assignment order.
  4 
  5 Returns an array containg the value of each key within the given dictionary
  6 value.
  7 
  8 Returns `null` if the given dictionary argment is not a valid dictionary.
  9 
 10 -- Testcase --
 11 {%
 12         printf("%.J\n", [
 13                 values({ foo: true, bar: false, baz: null, qrx: 123, xyz: "test" }),
 14                 values({}),
 15                 values(true),
 16                 values()
 17         ]);
 18 %}
 19 -- End --
 20 
 21 -- Expect stdout --
 22 [
 23         [
 24                 true,
 25                 false,
 26                 null,
 27                 123,
 28                 "test"
 29         ],
 30         [
 31         ],
 32         null,
 33         null
 34 ]
 35 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt