decoder-validate
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -628,3 +628,3 @@ /** | ||
Decoder.optional = function (decoder) { | ||
return new Decoder(function (json) { return (json === undefined ? ok(undefined) : decoder.decode(json)); }); | ||
return new Decoder(function (json) { return (json === undefined || json === null ? ok(undefined) : decoder.decode(json)); }); | ||
}; | ||
@@ -631,0 +631,0 @@ /** |
@@ -634,3 +634,3 @@ (function (global, factory) { | ||
Decoder.optional = function (decoder) { | ||
return new Decoder(function (json) { return (json === undefined ? ok(undefined) : decoder.decode(json)); }); | ||
return new Decoder(function (json) { return (json === undefined || json === null ? ok(undefined) : decoder.decode(json)); }); | ||
}; | ||
@@ -637,0 +637,0 @@ /** |
@@ -492,3 +492,3 @@ "use strict"; | ||
Decoder.optional = function (decoder) { | ||
return new Decoder(function (json) { return (json === undefined ? Result.ok(undefined) : decoder.decode(json)); }); | ||
return new Decoder(function (json) { return (json === undefined || json === null ? Result.ok(undefined) : decoder.decode(json)); }); | ||
}; | ||
@@ -495,0 +495,0 @@ /** |
{ | ||
"name": "decoder-validate", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "decoder validation", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.umd.js", |
@@ -1,1 +0,2 @@ | ||
# JSON Validation | ||
# JSON Validation# d e c o d e r - v a l i d a t e | ||