ast-types
Advanced tools
Comparing version 0.2.12 to 0.2.13
@@ -49,5 +49,8 @@ var assert = require("assert"); | ||
Tp.assert = function(value, deep) { | ||
var result = this.check(value, deep); | ||
assert.ok(result, shallowStringify(value) + " does not match type " + this); | ||
return result; | ||
if (!this.check(value, deep)) { | ||
var str = shallowStringify(value); | ||
assert.ok(false, str + " does not match type " + this); | ||
return false; | ||
} | ||
return true; | ||
}; | ||
@@ -507,4 +510,2 @@ | ||
value: function(object, fieldName) { | ||
isObject.assert(object); | ||
var d = Def.fromValue(object); | ||
@@ -511,0 +512,0 @@ if (d) { |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.2.12", | ||
"version": "0.2.13", | ||
"homepage": "http://github.com/benjamn/ast-types", | ||
@@ -24,0 +24,0 @@ "repository": { |
377422
10672