dist/yaml.legacy.js
function(file /* String */, callback /* Function */)
	{
		if ( callback == null )
		{
			var input = this.getFileContents(file);
			var ret = null;
			try
			{
				ret = this.parse(input);
			}
			catch ( e )
			{
				if ( e instanceof YamlParseException ) {
					e.setParsedFile(file);
				}
				throw e;
			}
			return ret;
		}
		
		this.getFileContents(file, function(data)
		{
			callback(new Yaml().parse(data));
		});
	}
function(file /* String */, callback /* Function */)
	{
		if ( callback == null )
		{
			var input = this.getFileContents(file);
			var ret = null;
			try
			{
				ret = this.parse(input);
			}
			catch ( e )
			{
				if ( e instanceof YamlParseException ) {
					e.setParsedFile(file);
				}
				throw e;
			}
			return ret;
		}
		
		this.getFileContents(file, function(data)
		{
			callback(new Yaml().parse(data));
		});
	}
function ( file /* String */ , callback /* Function */ ) { if ( callback == null ) { var input = this . getFileContents ( file ) ; var ret = null ; try { ret = this . parse ( input ) ; } catch ( e ) { if ( e instanceof YamlParseException ) { e . setParsedFile ( file ) ; } throw e ; } return ret ; } this . getFileContents ( file , function ( data ) { callback ( new Yaml ( ) . parse ( data ) ) ; } ) ; }
Parses YAML into a JS representation.

The parse method, when supplied with a YAML stream (file),
will do its best to convert YAML in a file into a JS representation.

Usage:
<code>
obj = yaml.parseFile('config.yml');
</code>

@param string input Path of YAML file

@return array The YAML converted to a JS representation

@throws YamlParseException If the YAML is not valid
Parses YAML into a JS representation .