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 47801ce..500066d 100644
--- a/src/gleam_stdlib.js
+++ b/src/gleam_stdlib.js
@@ -527,3 +527,7 @@ export function tuple_get(data, index) {
? new Ok(data[index])
: new Error(Nil);
}
+
+export function decode_list(data) {
+ return List.isList(data) ? new Ok(data) : decoder_error("List", data);
+}