@lanetix/type-visitor
Advanced tools
Comparing version 2.2.0 to 3.0.0
@@ -250,6 +250,10 @@ /* eslint-disable no-new-wrappers */ | ||
if (!(exp !== null && typeof exp === 'object' && Array.isArray(exp) && exp.length === 2)) { | ||
if (!(exp !== null && typeof exp === 'object' && !Array.isArray(exp))) { | ||
return false; | ||
} | ||
var label = exp[0]; | ||
var labels = Object.keys(exp); | ||
if (labels.length !== 1) { | ||
return false; | ||
} | ||
var label = labels[0]; | ||
var ty = args[label]; | ||
@@ -259,3 +263,3 @@ if (!ty) { | ||
} | ||
return down(exp[1], function (valids) { | ||
return down(exp[label], function (valids) { | ||
return valids[label]; | ||
@@ -262,0 +266,0 @@ }); |
{ | ||
"name": "@lanetix/type-visitor", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "visit your types", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
47950
6
380