summaryrefslogtreecommitdiff
path: root/functions/repack.pp
diff options
context:
space:
mode:
Diffstat (limited to 'functions/repack.pp')
-rw-r--r--functions/repack.pp7
1 files changed, 7 insertions, 0 deletions
diff --git a/functions/repack.pp b/functions/repack.pp
new file mode 100644
index 0000000..396354c
--- /dev/null
+++ b/functions/repack.pp
@@ -0,0 +1,7 @@
+# Normalizes a hash or a list of hashes to a list of hashes
+function networking::repack(Variant[Hash, Array[Hash]] $data) >> Array[Hash] {
+ $data ? {
+ Hash => [$data],
+ _ => $data,
+ }
+}