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

Sources/ucode/tests/custom/03_stdlib/10_keys

  1 The `keys()` function returns an array containing all keys of the given
  2 dictionary value. The keys are sorted in declaration order.
  3 
  4 -- Testcase --
  5 {{ keys({ "foo": true, "bar": false, "qrx": 123 }) }}
  6 -- End --
  7 
  8 -- Expect stdout --
  9 [ "foo", "bar", "qrx" ]
 10 -- End --
 11 
 12 
 13 If the given argument is not a dictionary, the function returns `null`.
 14 
 15 -- Testcase --
 16 {{ keys(true) === null }}
 17 -- End --
 18 
 19 -- Expect stdout --
 20 true
 21 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt