aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/gleam_stdlib.js')
-rw-r--r--src/gleam_stdlib.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gleam_stdlib.js b/src/gleam_stdlib.js
index 500066d..4a3026c 100644
--- a/src/gleam_stdlib.js
+++ b/src/gleam_stdlib.js
@@ -531,3 +531,7 @@ export function tuple_get(data, index) {
export function decode_list(data) {
return List.isList(data) ? new Ok(data) : decoder_error("List", data);
}
+
+export function decode_map(data) {
+ return data instanceof Map ? new Ok(data) : decoder_error("Map", data);
+}