I would like to parse YAML in the browser. Ideally I’m looking for a browser-ready library. The ones I’ve found are not written to run in a browser (they make synchronous calls to require() or assume the existence of an exports variable).
Alternatively, I’ll accept example code that shows how to load a YAML-parsing library into the browser via RequireJS.
Similar question: JavaScript YAML Parser.
The most promising library that seems to work in the browser is js-yaml. A snippet from the project page for loading the library in HTML:
They claim to also support AMD loaders like RequireJS.
Here is the “browserified” version of the library: with comments and minified.