Function
assertJsonOrYaml
(
/** @type {string} */ url,
/** @type {string} */ str,
)
Source from the content-addressed store, hash-verified
| 903 | }) |
| 904 | |
| 905 | function assertJsonOrYaml( |
| 906 | /** @type {string} */ url, |
| 907 | /** @type {string} */ str, |
| 908 | ) { |
| 909 | try { |
| 910 | JSON.parse(str) |
| 911 | return |
| 912 | } catch {} |
| 913 | |
| 914 | try { |
| 915 | YAML.parse(str) |
| 916 | return |
| 917 | } catch {} |
| 918 | |
| 919 | console.info(`NOT OK (Not JSON/YAML): ${url}`) |
| 920 | } |
| 921 | }) |
| 922 | } |
| 923 | // await printDowngradableSchemaVersions() |
Tested by
no test coverage detected