@asyncapi/parser
Advanced tools
Comparing version 1.5.1 to 1.5.2
@@ -11,3 +11,3 @@ const ParserError = require('../errors/parser-error'); | ||
constructor (json) { | ||
if (!json) throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`); | ||
if (json === undefined || json === null) throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`); | ||
this._json = json; | ||
@@ -14,0 +14,0 @@ } |
@@ -368,2 +368,9 @@ const { createMapOfType, getMapValueOfType, mix } = require('./utils'); | ||
*/ | ||
isBooleanSchema() { | ||
return typeof this._json === 'boolean'; | ||
} | ||
/** | ||
* @returns {boolean} | ||
*/ | ||
isCircular() { | ||
@@ -370,0 +377,0 @@ return !!this.ext('x-parser-circular'); |
{ | ||
"name": "@asyncapi/parser", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "JavaScript AsyncAPI parser.", | ||
@@ -71,3 +71,3 @@ "main": "lib/index.js", | ||
"@apidevtools/json-schema-ref-parser": "^9.0.6", | ||
"@asyncapi/specs": "^2.7.7", | ||
"@asyncapi/specs": "^2.7.8", | ||
"@fmvilas/pseudo-yaml-ast": "^0.3.1", | ||
@@ -74,0 +74,0 @@ "ajv": "^6.10.1", |
@@ -248,2 +248,3 @@ <h5 align="center"> | ||
<td align="center"><a href="https://github.com/JQrdan"><img src="https://avatars.githubusercontent.com/u/25624685?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jordan Tucker</b></sub></a><br /><a href="https://github.com/asyncapi/parser-js/commits?author=JQrdan" title="Tests">⚠️</a> <a href="https://github.com/asyncapi/parser-js/commits?author=JQrdan" title="Code">💻</a></td> | ||
<td align="center"><a href="https://github.com/vishesh13byte"><img src="https://avatars.githubusercontent.com/u/66796715?v=4?s=100" width="100px;" alt=""/><br /><sub><b>vishesh13byte</b></sub></a><br /><a href="https://github.com/asyncapi/parser-js/commits?author=vishesh13byte" title="Tests">⚠️</a></td> | ||
</tr> | ||
@@ -250,0 +251,0 @@ </table> |
@@ -855,2 +855,3 @@ /** | ||
examples(): any[]; | ||
isBooleanSchema(): boolean; | ||
isCircular(): boolean; | ||
@@ -857,0 +858,0 @@ hasCircularProps(): boolean; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1152093
7122
258
Updated@asyncapi/specs@^2.7.8