js-yaml works fine in Safari, Chrome and Firefox on OSX. Here is an example :
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Test js-yaml</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="./js-yaml/dist/js-yaml.min.js"></script>
<script type="text/javascript">
// YAML string to Javascript object
var obj = jsyaml.load( 'greeting: hello\nname: world' );
console.log( obj );
// YAML file to Javascript object
$.get( 'https://raw.githubusercontent.com/nodeca/js-yaml/c50f9936bd1e99d64a54d30400e377f4fda401c5/benchmark/samples/document_application2.yaml', function( data ) {
var obj = jsyaml.load( data );
console.log( obj );
});
// Huge YAML file (7.2 MB) to Javascript object
$.get( 'https://raw.githubusercontent.com/nodeca/js-yaml/master/benchmark/samples/document_huge.yaml', function( data ) {
var obj = jsyaml.load( data );
console.log( obj );
});
</script>
</head>
<body>
<h1>Test js-yaml</h1>
<p><a href="https://github.com/nodeca/js-yaml">https://github.com/nodeca/js-yaml</a></p>
</body>
</html>