dist/yaml.legacy.js
function(value)
	{
		if ( '*' == (value+'').charAt(0) )
		{
			if ( this.trim(value).charAt(0) == '#' )
			{
				value = (value+'').substr(1, value.indexOf('#') - 2);
			}
			else
			{
				value = (value+'').substr(1);
			}

			if ( this.refs[value] == undefined )
			{
				throw new YamlParseException('Reference "'+value+'" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine);
			}
			return this.refs[value];
		}

		var matches = null;
		if ( matches = /^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(value) )
		{
			matches = {separator: matches[1], modifiers: matches[2], comments: matches[3]};
			var modifiers = this.isDefined(matches.modifiers) ? matches.modifiers : '';

			return this.parseFoldedScalar(matches.separator, modifiers.replace(/\d+/g, ''), Math.abs(parseInt(modifiers)));
		}
		try {
			return new YamlInline().parse(value);
		} catch (e) {
			if ( e instanceof YamlParseException ) {
				e.setParsedLine(this.getRealCurrentLineNb() + 1);
				e.setSnippet(this.currentLine);
			}
			throw e;
		}
	}
function(value)
	{
		if ( '*' == (value+'').charAt(0) )
		{
			if ( this.trim(value).charAt(0) == '#' )
			{
				value = (value+'').substr(1, value.indexOf('#') - 2);
			}
			else
			{
				value = (value+'').substr(1);
			}

			if ( this.refs[value] == undefined )
			{
				throw new YamlParseException('Reference "'+value+'" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine);
			}
			return this.refs[value];
		}

		var matches = null;
		if ( matches = /^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(value) )
		{
			matches = {separator: matches[1], modifiers: matches[2], comments: matches[3]};
			var modifiers = this.isDefined(matches.modifiers) ? matches.modifiers : '';

			return this.parseFoldedScalar(matches.separator, modifiers.replace(/\d+/g, ''), Math.abs(parseInt(modifiers)));
		}
		try {
			return new YamlInline().parse(value);
		} catch (e) {
			if ( e instanceof YamlParseException ) {
				e.setParsedLine(this.getRealCurrentLineNb() + 1);
				e.setSnippet(this.currentLine);
			}
			throw e;
		}
	}
function ( value ) { if ( '*' == ( value + '' ) . charAt ( 0 ) ) { if ( this . trim ( value ) . charAt ( 0 ) == '#' ) { value = ( value + '' ) . substr ( 1 , value . indexOf ( '#' ) - 2 ) ; } else { value = ( value + '' ) . substr ( 1 ) ; } if ( this . refs [ value ] == undefined ) { throw new YamlParseException ( 'Reference "' + value + '" does not exist' , this . getRealCurrentLineNb ( ) + 1 , this . currentLine ) ; } return this . refs [ value ] ; } var matches = null ; if ( matches = / ^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$ / . exec ( value ) ) { matches = { separator : matches [ 1 ] , modifiers : matches [ 2 ] , comments : matches [ 3 ] } ; var modifiers = this . isDefined ( matches . modifiers ) ? matches . modifiers : '' ; return this . parseFoldedScalar ( matches . separator , modifiers . replace ( / \d+ / g , '' ) , Math . abs ( parseInt ( modifiers ) ) ) ; } try { return new YamlInline ( ) . parse ( value ) ; } catch ( e ) { if ( e instanceof YamlParseException ) { e . setParsedLine ( this . getRealCurrentLineNb ( ) + 1 ) ; e . setSnippet ( this . currentLine ) ; } throw e ; } }
Parses a YAML value.

@param string value A YAML value

@return mixed A JS value

@throws YamlParseException When reference does not exist
Parses a YAML value .