(s)
| 52673 | constructor(s = {}) { |
| 52674 | super({ name: 'json-swagger-client', mediaTypes: ['application/json'], ...s }) |
| 52675 | } |
| 52676 | async canParse(s) { |
| 52677 | const o = 0 === this.fileExtensions.length || this.fileExtensions.includes(s.extension), |
| 52678 | i = this.mediaTypes.includes(s.mediaType) |
| 52679 | if (!o) return !1 |
| 52680 | if (i) return !0 |
| 52681 | if (!i) |
| 52682 | try { |
| 52683 | return (JSON.parse(s.toString()), !0) |
| 52684 | } catch (s) { |
| 52685 | return !1 |
| 52686 | } |
| 52687 | return !1 |
| 52688 | } |
| 52689 | async parse(s) { |
| 52690 | if (this.sourceMap) |