Convert yaml to json in script

Postman lists both js-yaml and yaml.js as dependencies.
Is one of them exposed in the scripts?
I would like to convert my openApi yaml to json so that I can validate API responses against their schema’s inside the API spec (the yaml would be fetched from github)