4 module Puppet::Parser::Functions
5 newfunction(:keys, :type => :rvalue, :doc => <<-DOC
7 **Deprecated:** Returns the keys of a hash as an array.
10 An array containing each of the hashes key values.
12 > **Note:** **Deprecated** from Puppet 5.5.0, the built-in [`keys`](https://puppet.com/docs/puppet/latest/function.html#keys)
13 function will be used instead of this function.
17 raise(Puppet::ParseError, "keys(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty?
21 unless hash.is_a?(Hash)
22 raise(Puppet::ParseError, 'keys(): Requires hash to work with')
31 # vim: set ts=2 sw=2 et :