dist/yaml.legacy.js
function(input, inline, indent)
	{
		if ( inline == null ) inline = 0;
		if ( indent == null ) indent = 0;
		var output = '';
		var prefix = indent ? this.strRepeat(' ', indent) : '';
		var yaml;
		if (!this.numSpacesForIndentation) this.numSpacesForIndentation = 2;

		if ( inline <= 0 || !this.isObject(input) || this.isEmpty(input) )
		{
			yaml = new YamlInline();
			output += prefix + yaml.dump(input);
		}
		else
		{
			var isAHash = !this.arrayEquals(this.getKeys(input), this.range(0,input.length - 1));
			var willBeInlined;
			
			for ( var key in input )
			{
				if ( input.hasOwnProperty(key) )
				{
					willBeInlined = inline - 1 <= 0 || !this.isObject(input[key]) || this.isEmpty(input[key]);
					
					if ( isAHash ) yaml = new YamlInline();
					
					output += 
						prefix + '' +
						(isAHash ? yaml.dump(key)+':' : '-') + '' +
						(willBeInlined ? ' ' : "\n") + '' +
						this.dump(input[key], inline - 1, (willBeInlined ? 0 : indent + this.numSpacesForIndentation)) + '' +
						(willBeInlined ? "\n" : '');
				}
			}
		}

		return output;
	}
function(input, inline, indent)
	{
		if ( inline == null ) inline = 0;
		if ( indent == null ) indent = 0;
		var output = '';
		var prefix = indent ? this.strRepeat(' ', indent) : '';
		var yaml;
		if (!this.numSpacesForIndentation) this.numSpacesForIndentation = 2;

		if ( inline <= 0 || !this.isObject(input) || this.isEmpty(input) )
		{
			yaml = new YamlInline();
			output += prefix + yaml.dump(input);
		}
		else
		{
			var isAHash = !this.arrayEquals(this.getKeys(input), this.range(0,input.length - 1));
			var willBeInlined;
			
			for ( var key in input )
			{
				if ( input.hasOwnProperty(key) )
				{
					willBeInlined = inline - 1 <= 0 || !this.isObject(input[key]) || this.isEmpty(input[key]);
					
					if ( isAHash ) yaml = new YamlInline();
					
					output += 
						prefix + '' +
						(isAHash ? yaml.dump(key)+':' : '-') + '' +
						(willBeInlined ? ' ' : "\n") + '' +
						this.dump(input[key], inline - 1, (willBeInlined ? 0 : indent + this.numSpacesForIndentation)) + '' +
						(willBeInlined ? "\n" : '');
				}
			}
		}

		return output;
	}
function ( input , inline , indent ) { if ( inline == null ) inline = 0 ; if ( indent == null ) indent = 0 ; var output = '' ; var prefix = indent ? this . strRepeat ( ' ' , indent ) : '' ; var yaml ; if ( ! this . numSpacesForIndentation ) this . numSpacesForIndentation = 2 ; if ( inline <= 0 || ! this . isObject ( input ) || this . isEmpty ( input ) ) { yaml = new YamlInline ( ) ; output += prefix + yaml . dump ( input ) ; } else { var isAHash = ! this . arrayEquals ( this . getKeys ( input ) , this . range ( 0 , input . length - 1 ) ) ; var willBeInlined ; for ( var key in input ) { if ( input . hasOwnProperty ( key ) ) { willBeInlined = inline - 1 <= 0 || ! this . isObject ( input [ key ] ) || this . isEmpty ( input [ key ] ) ; if ( isAHash ) yaml = new YamlInline ( ) ; output += prefix + '' + ( isAHash ? yaml . dump ( key ) + ':' : '-' ) + '' + ( willBeInlined ? ' ' : "\n" ) + '' + this . dump ( input [ key ] , inline - 1 , ( willBeInlined ? 0 : indent + this . numSpacesForIndentation ) ) + '' + ( willBeInlined ? "\n" : '' ) ; } } } return output ; }
Dumps a JS value to YAML.

@param	mixed	 input	The JS value
@param	integer inline The level where you switch to inline YAML
@param	integer indent The level o indentation indentation (used internally)

@return string	The YAML representation of the JS value
Dumps a JS value to YAML .