lib/abaaso.js
function ( obj, dom ) {
		dom = ( dom === true );
		var id;

		if ( obj !== undefined && ( ( obj.id !== undefined && obj.id !== "" ) || ( obj instanceof Array ) || ( obj instanceof String || typeof obj === "string" ) ) ) {
			return obj;
		}

		if ( dom ) {
			do {
				id = utility.domId( utility.uuid( true) );
			}
			while ( utility.$( "#" + id ) !== undefined );
		}
		else {
			id = utility.domId( utility.uuid( true) );
		}

		if ( typeof obj === "object" ) {
			obj.id = id;

			return obj;
		}
		else {
			return id;
		}
	}
function ( obj, dom ) {
		dom = ( dom === true );
		var id;

		if ( obj !== undefined && ( ( obj.id !== undefined && obj.id !== "" ) || ( obj instanceof Array ) || ( obj instanceof String || typeof obj === "string" ) ) ) {
			return obj;
		}

		if ( dom ) {
			do {
				id = utility.domId( utility.uuid( true) );
			}
			while ( utility.$( "#" + id ) !== undefined );
		}
		else {
			id = utility.domId( utility.uuid( true) );
		}

		if ( typeof obj === "object" ) {
			obj.id = id;

			return obj;
		}
		else {
			return id;
		}
	}
function ( obj , dom ) { dom = ( dom === true ) ; var id ; if ( obj !== undefined && ( ( obj . id !== undefined && obj . id !== "" ) || ( obj instanceof Array ) || ( obj instanceof String || typeof obj === "string" ) ) ) { return obj ; } if ( dom ) { do { id = utility . domId ( utility . uuid ( true ) ) ; } while ( utility . $ ( "#" + id ) !== undefined ) ; } else { id = utility . domId ( utility . uuid ( true ) ) ; } if ( typeof obj === "object" ) { obj . id = id ; return obj ; } else { return id ; } }
Generates an ID value

@method genId
@param  {Mixed}   obj [Optional] Object to receive id
@param  {Boolean} dom [Optional] Verify the ID is unique in the DOM, default is false
@return {Mixed}       Object or id
Generates an ID value