vm/moonshine.js
function formatValue (value) {
		if (typeof value == 'string') {
			value = value.replace(NEWLINE_PATTERN, '\\n');
			value = value.replace(APOS_PATTERN, '\\\'');
			return "'" + value + "'";
		}

		return value;
	}
function formatValue (value) {
		if (typeof value == 'string') {
			value = value.replace(NEWLINE_PATTERN, '\\n');
			value = value.replace(APOS_PATTERN, '\\\'');
			return "'" + value + "'";
		}

		return value;
	}
function formatValue ( value ) { if ( typeof value == 'string' ) { value = value . replace ( NEWLINE_PATTERN , '\\n' ) ; value = value . replace ( APOS_PATTERN , '\\\'' ) ; return "'" + value + "'" ; } return value ; }
Returns a parsable string representation of a primative value.
@param {object} value The input value.
@returns {string} A string-encoded representation.
Returns a parsable string representation of a primative value .