summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorNick Walker <npwalker@users.noreply.github.com>2016-12-01 05:54:08 -0800
committerDavid Schmitt <david.schmitt@puppet.com>2016-12-01 13:54:08 +0000
commitd3bbd3cbf89cb23bce4e55c3828e17c05c4cfd70 (patch)
treeea11726f3bfe7f5d6545075c83168547cbd3dc99 /README.markdown
parentcb59da2359f956e3dccec228e16f6b3aaa6758c4 (diff)
Indicate that the type function is preferred (#695)
Prior to this commit, users coming to the type_of function would not realize that the type function in puppet does the same thing and is preferred over type_of. After this commit, we have a comment indicating the above.
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown2
1 files changed, 2 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 3e937b1..a6b7bda 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1190,6 +1190,8 @@ Returns a string description of the type when passed a value. Type can be a stri
#### `type_of`
+This function is provided for backwards compatibility but is generally not preferred over the built-in [type() function](https://docs.puppet.com/puppet/latest/reference/function.html#type) provided by Puppet.
+
Returns the literal type when passed a value. Requires the new parser. Useful for comparison of types with `<=` such as in `if type_of($some_value) <= Array[String] { ... }` (which is equivalent to `if $some_value =~ Array[String] { ... }`) *Type*: rvalue.
#### `union`