lib/abaaso.js
function ( arg, target ) {
		var frag;

		if ( typeof arg !== "object" || (!(regex.object_undefined.test( typeof target ) ) && ( target = target.charAt( 0 ) === "#" ? utility.$( target ) : utility.$( target )[0] ) === undefined ) ) {
			throw new Error( label.error.invalidArguments );
		}

		if ( target === undefined ) {
			target = utility.$( "body" )[0];
		}

		frag  = document.createDocumentFragment();

		if ( arg instanceof Array ) {
			array.each( arg, function ( i ) {
				element.html( element.create( array.cast( i, true )[0], frag ), array.cast(i)[0] );
			});
		}
		else {
			utility.iterate( arg, function ( v, k ) {
				if ( typeof v === "string" ) {
					element.html( element.create( k, undefined, frag ), v );
				}
				else if ( ( v instanceof Array ) || ( v instanceof Object ) ) {
					utility.tpl( v, element.create( k, undefined, frag ) );
				}
			});
		}

		target.appendChild( frag );

		return array.last( target.childNodes );
	}
function ( arg, target ) {
		var frag;

		if ( typeof arg !== "object" || (!(regex.object_undefined.test( typeof target ) ) && ( target = target.charAt( 0 ) === "#" ? utility.$( target ) : utility.$( target )[0] ) === undefined ) ) {
			throw new Error( label.error.invalidArguments );
		}

		if ( target === undefined ) {
			target = utility.$( "body" )[0];
		}

		frag  = document.createDocumentFragment();

		if ( arg instanceof Array ) {
			array.each( arg, function ( i ) {
				element.html( element.create( array.cast( i, true )[0], frag ), array.cast(i)[0] );
			});
		}
		else {
			utility.iterate( arg, function ( v, k ) {
				if ( typeof v === "string" ) {
					element.html( element.create( k, undefined, frag ), v );
				}
				else if ( ( v instanceof Array ) || ( v instanceof Object ) ) {
					utility.tpl( v, element.create( k, undefined, frag ) );
				}
			});
		}

		target.appendChild( frag );

		return array.last( target.childNodes );
	}
function ( arg , target ) { var frag ; if ( typeof arg !== "object" || ( ! ( regex . object_undefined . test ( typeof target ) ) && ( target = target . charAt ( 0 ) === "#" ? utility . $ ( target ) : utility . $ ( target ) [ 0 ] ) === undefined ) ) { throw new Error ( label . error . invalidArguments ) ; } if ( target === undefined ) { target = utility . $ ( "body" ) [ 0 ] ; } frag = document . createDocumentFragment ( ) ; if ( arg instanceof Array ) { array . each ( arg , function ( i ) { element . html ( element . create ( array . cast ( i , true ) [ 0 ] , frag ) , array . cast ( i ) [ 0 ] ) ; } ) ; } else { utility . iterate ( arg , function ( v , k ) { if ( typeof v === "string" ) { element . html ( element . create ( k , undefined , frag ) , v ) ; } else if ( ( v instanceof Array ) || ( v instanceof Object ) ) { utility . tpl ( v , element . create ( k , undefined , frag ) ) ; } } ) ; } target . appendChild ( frag ) ; return array . last ( target . childNodes ) ; }
Transforms JSON to HTML and appends to Body or target Element

@method tpl
@param  {Object} data   JSON Object describing HTML
@param  {Mixed}  target [Optional] Target Element or Element.id to receive the HTML
@return {Object}        New Element created from the template
Transforms JSON to HTML and appends to Body or target Element