Comparing version 1.1.2 to 1.1.3
@@ -93,3 +93,3 @@ function getName (value) { | ||
} catch (e) { | ||
throw new TypeError('Expected property "' + propertyName + '" of type ' + JSON.stringify(propertyType) + ', got ' + getName(propertyValue) + ' ' + propertyValue) | ||
throw new TypeError('Expected property "' + propertyName + '" of type ' + JSON.stringify(propertyType) + ', got ' + getName(propertyValue) + ' ' + JSON.stringify(propertyValue)) | ||
} | ||
@@ -104,3 +104,3 @@ } | ||
throw new TypeError('Expected ' + typeName + ', got ' + getName(value) + ' ' + value) | ||
throw new TypeError('Expected ' + typeName + ', got ' + getName(value) + ' ' + JSON.stringify(value)) | ||
} |
{ | ||
"name": "typeforce", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Another biased type checking solution for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -133,3 +133,3 @@ { | ||
{ | ||
"exception": "Expected Array, got String foobar", | ||
"exception": "Expected Array, got String \"foobar\"", | ||
"type": "Array", | ||
@@ -139,3 +139,3 @@ "value": "foobar" | ||
{ | ||
"exception": "Expected Array, got CustomType \\[object Object\\]", | ||
"exception": "Expected Array, got CustomType {}", | ||
"type": "Array", | ||
@@ -145,3 +145,3 @@ "custom": "CustomType" | ||
{ | ||
"exception": "Expected Array, got Object \\[object Object\\]", | ||
"exception": "Expected Array, got Object {}", | ||
"type": "Array", | ||
@@ -166,3 +166,3 @@ "value": {} | ||
{ | ||
"exception": "Expected Boolean, got String foobar", | ||
"exception": "Expected Boolean, got String \"foobar\"", | ||
"type": "Boolean", | ||
@@ -172,3 +172,3 @@ "value": "foobar" | ||
{ | ||
"exception": "Expected Boolean, got CustomType \\[object Object\\]", | ||
"exception": "Expected Boolean, got CustomType {}", | ||
"type": "Boolean", | ||
@@ -178,3 +178,3 @@ "custom": "CustomType" | ||
{ | ||
"exception": "Expected Boolean, got Object \\[object Object\\]", | ||
"exception": "Expected Boolean, got Object {}", | ||
"type": "Boolean", | ||
@@ -199,3 +199,3 @@ "value": {} | ||
{ | ||
"exception": "Expected Buffer, got String foobar", | ||
"exception": "Expected Buffer, got String \"foobar\"", | ||
"type": "Buffer", | ||
@@ -205,3 +205,3 @@ "value": "foobar" | ||
{ | ||
"exception": "Expected Buffer, got CustomType \\[object Object\\]", | ||
"exception": "Expected Buffer, got CustomType {}", | ||
"type": "Buffer", | ||
@@ -211,3 +211,3 @@ "custom": "CustomType" | ||
{ | ||
"exception": "Expected Buffer, got Object \\[object Object\\]", | ||
"exception": "Expected Buffer, got Object {}", | ||
"type": "Buffer", | ||
@@ -232,3 +232,3 @@ "value": {} | ||
{ | ||
"exception": "Expected Number, got String foobar", | ||
"exception": "Expected Number, got String \"foobar\"", | ||
"type": "Number", | ||
@@ -238,3 +238,3 @@ "value": "foobar" | ||
{ | ||
"exception": "Expected Number, got CustomType \\[object Object\\]", | ||
"exception": "Expected Number, got CustomType {}", | ||
"type": "Number", | ||
@@ -244,3 +244,3 @@ "custom": "CustomType" | ||
{ | ||
"exception": "Expected Number, got Object \\[object Object\\]", | ||
"exception": "Expected Number, got Object {}", | ||
"type": "Number", | ||
@@ -270,3 +270,3 @@ "value": {} | ||
{ | ||
"exception": "Expected String, got CustomType \\[object Object\\]", | ||
"exception": "Expected String, got CustomType {}", | ||
"type": "String", | ||
@@ -276,3 +276,3 @@ "custom": "CustomType" | ||
{ | ||
"exception": "Expected String, got Object \\[object Object\\]", | ||
"exception": "Expected String, got Object {}", | ||
"type": "String", | ||
@@ -302,3 +302,3 @@ "value": {} | ||
{ | ||
"exception": "Expected CustomType, got String foobar", | ||
"exception": "Expected CustomType, got String \"foobar\"", | ||
"type": "CustomType", | ||
@@ -308,3 +308,3 @@ "value": "foobar" | ||
{ | ||
"exception": "Expected CustomType, got Object \\[object Object\\]", | ||
"exception": "Expected CustomType, got Object {}", | ||
"type": "CustomType", | ||
@@ -324,3 +324,3 @@ "value": {} | ||
{ | ||
"exception": "Expected Object, got String foobar", | ||
"exception": "Expected Object, got String \"foobar\"", | ||
"type": "Object", | ||
@@ -380,3 +380,3 @@ "value": "foobar" | ||
{ | ||
"exception": "Expected Object, got String foobar", | ||
"exception": "Expected Object, got String \"foobar\"", | ||
"type": { | ||
@@ -401,3 +401,3 @@ "a": "Number", | ||
{ | ||
"exception": "Expected property \"a\" of type \"Number\", got String wrong", | ||
"exception": "Expected property \"a\" of type \"Number\", got String \"foobar\"", | ||
"type": { | ||
@@ -410,7 +410,7 @@ "a": "Number", | ||
"value": { | ||
"a": "wrong" | ||
"a": "foobar" | ||
} | ||
}, | ||
{ | ||
"exception": "Expected property \"b\" of type {\"c\":\"String\"}, got String wrong", | ||
"exception": "Expected property \"b\" of type {\"c\":\"String\"}, got String \"foobar\"", | ||
"type": { | ||
@@ -424,7 +424,7 @@ "a": "Number", | ||
"a": 1, | ||
"b": "wrong" | ||
"b": "foobar" | ||
} | ||
}, | ||
{ | ||
"exception": "Expected property \"b\" of type {\"c\":\"String\"}, got Object \\[object Object\\]", | ||
"exception": "Expected property \"b\" of type {\"c\":\"String\"}, got Object {\"c\":2}", | ||
"type": { | ||
@@ -491,3 +491,3 @@ "a": "Number", | ||
{ | ||
"exception": "Expected Function, got String foobar", | ||
"exception": "Expected Function, got String \"foobar\"", | ||
"type": "Function", | ||
@@ -497,3 +497,3 @@ "value": "foobar" | ||
{ | ||
"exception": "Expected Function, got CustomType \\[object Object\\]", | ||
"exception": "Expected Function, got CustomType {}", | ||
"type": "Function", | ||
@@ -503,3 +503,3 @@ "custom": "CustomType" | ||
{ | ||
"exception": "Expected Function, got Object \\[object Object\\]", | ||
"exception": "Expected Function, got Object {}", | ||
"type": "Function", | ||
@@ -519,3 +519,3 @@ "value": {} | ||
{ | ||
"exception": "Expected \\?, got String foobar", | ||
"exception": "Expected \\?, got String \"foobar\"", | ||
"type": "?", | ||
@@ -522,0 +522,0 @@ "value": "foobar" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16712